Home
MPS 051 - grifo¨ COM
Contents
1. _ INTRODUZIONE Scopo di questo manuale la trasmissione delle informazioni necessarie all uso competente e sicuro dei prodotti Esse sono il frutto di un elaborazione continua e sistematica di dati e prove tecniche registrate e validate dal Costruttore in attuazione alle procedure interne di sicurezza e qualita dell informazione Per un corretto rapporto coi prodotti necessario garantire leggibilit e conservazione del manuale anche per futuri riferimenti In caso di deterioramento pi semplicemente per ragioni di approfondimento tecnico ed operativo consultare direttamente Assistenza Tecnica autorizzata A fine di non incontrare problemi nell uso di tali dispositivi conveniente che l utente PRIMA DI COMINCIARE AD OPERARE legga con attenzione tutte le informazioni contenute in questo manuale In una seconda fase per rintracciare piu facilmente le informazioni necessarie si puo fare riferimento all indice generale e all indice analitico posti rispettivamente all inizio ed alla fine del manuale Le informazioni fornite in questo manuale sono precise ed affidabili fino alla data di rilascio del manuale stesso ma l impegno per migliorare tutti 1 nostri prodotti non si ferma mai Siete pregati di consultare 1 file di documentazione nei floppy per eventuali aggiornamenti dell ultimo minuto Questo programma di controllo protetto dalle leggi sul diritto d autor
2. 8 JTOMPER 22 uu uuu u 5 uuu 9 9 VIO EU 1 sn KANA 11 SIMNICLAZIONE 11 PROGRAIVEVEA Z 11 DESCRIZIONE SOF TE WARE Di PN MNA u a uu unu u ns 12 REQUISITI MINIMI DEL P BOYAN DO a a eyan 12 CONTENUTO DEL DISCO ec 12 LANCIARE IL PROGRAMMA DI CONTROLLO 13 AV VIO DEL PROGRAMMA CON PARAMETRI 13 SIVULA ORE uu 14 NOTE SULLA IM LA ZTON T u na us 15 ON TINE DL E u uuu E ayan 15 OPERAZIONI IN SINGLE STEP aiar 16 NOTA DI ULILAZZO DELLO STEP O Y K era 17 INSTALLAZIONE DI BREAK POINT NEL PROGRAMMA DEBUGGATO 17 LIMITAZIONI DEL PROGRAMMA IN SINGLE STEP 17 W k 18 PROCEDURA CONSIGLIATA reno 19 e oi u li a l NNN A RAN E 20 DEBUGGING DEL yi i ss y s eleke aa kun dR rH ES h ARK V ku d k 21 LIMITAZIONI HARDWARE DEL CIRCUITO 89 2051 21 LIMELAZIONI SOET WARE ira 22 COMANDI DEL PROGRAMMA DI CONTROLLO 23
3. _ PROGRAM DEBUGGING e Translate the source file with ORG modifications for the simulator Use the VIEW EDIT BUFFER command to review and if necessary edit the data in the working area reserved for the simulator If everything is O K the program may be started by the GOTO or the CALL command to the required address within the range of 1000H 17FFH The EXAMPLE program expects a character from the serial port Thereafter the sequence of events described in the beginning of this chapter will be executed When the program run is over a negated value remains at the PI port You can check it by giving the INPUT command with the P1 parameter HARDWARE LIMITATIONS ON THE AT89C2051 CIRCUIT The simulator simulates the AT89C2051 12PC processor The simulator cannot operate in the same supply voltage range as the AT89C2051 1051 microcontrollers When supplied from the internal power source the debugged application can also operate with the minimum supply voltage for the AT89C205 1 1051 2 7V provided that no problems arise from the fact that pull up resistors pull up log 1 to the level of 5V in the simulation process Certainly voltage of at least 1 9V must be available to the log 1 input level Supply voltage of the simulator does not affect that of the application they are separated by a diode If the JP4 jumper is disconnected the VCC value in the application can equal the maximum voltage permissible for
4. 9 h Function This command reads P1 and P3 ports permanently and displays its values in hexadecimal and binary form P3 6 pin is always set to logic H Use this command for a new value writing to the P1 or P3 port of simulator The command starts subroutine in external RAM of simulator which begins on specified address The command waits while a called subroutine was beending by a RET command If run of called subroutine is beending in endless loop use a HW RESET of simulator or key lt ESC gt for a correct return to the Monitor HW RESET don t changes data in external RAM Specified address must be in range 1000H 17FFH for AT89C2051 device respectively 1000H 13FFH for 89 10514 Before every execution of this command are data from buffer copied to an external RAM sake synchronize data in buffer with the external RAM Selected address must be from interval 1000H 13FFh respectively 1000H 17FFh by type of selected microcontroller Note User have free 28B from stack If ourselves define new stack return address will be lost For successfull return we can reference to use instruction LJMP 0000 on the end of routine which restore monitor into original state This command starts a program in external RAM of simulator which begins on specified address Command doesn t wait for beending of routine Communication with simulator isn t possible while program runs If program beends in endless loop use aHW RESET
5. possibile modificare il contenuto dei port PI e P3 ad eccezione di P3 2 e P3 6 vedere e modificare la RAM interna ed alcuni registri Ulteriori informazioni sul single step si possono trovare nella documentazione tecnica dei microcontrollori della famiglia MCS 51 Nei programmi di esempio contenuti nel floppy si trovano informazioni sulle modifiche necessarie al single step Si consiglia inoltre di leggere 1 paragrafi di questo manuale dedicati al debugging in modalit STEP Questo comando viene usato per debuggare 1 sotto programmi istruzione per istruzione Bisogna ricordare che per generare l interrupt interno viene usato il pin P3 3 INTI quindi non sar disponibile per il programma In questa modalit possibile modificare il contenuto dei port PI e ad eccezione di P3 2 e P3 6 vedere e modificare la RAM interna ed alcuni registri Ulteriori informazioni sul single step si possono trovare nella documentazione tecnica dei microcontrollori della famiglia MCS 51 Nei programmi di esempio contenuti nel floppy si trovano informazioni sulle modifiche necessarie al single step Si consiglia inoltre di leggere 1 paragrafi di questo manuale dedicati al debugging in modalit STEP Questo comando si usa per vedere modo view o modificare modo edit 1 dati nella RAM interna al simulatore visualizzazione solo in modo DUMP nel campo 00H 7FH Usate 1 tasti freccia per selezionare l oggetto da modificare 1 dati modificati sono visu
6. La colonna SUPPL contiene il complemento della checksum SUM SUPPL 0000H carry Pagina 27 Cra E Nome MENU OPTIONS Buffer name Monitor Sound All Hex loadings Pagina 28 Tasti grifo __ ITALIAN TECHNOLOGY Funzione Da questo comando si pu impostare il pathname completo del file di buffer su disco in caso non dovesse bastare la memoria centrale del PC o della finestra DOS Non viene effettuato alcun controllo se il nome inserito errato il problema verr rilevato solo nel momento in cui il programma di controllo tenter di creare il file Questa impostazione viene salvata nel file S051 CFG dal comando Options Save options Il nome di default S051 0 Questo comando imposta 1 colori del display VGA usato monocromatico o a colori Il cambiamento imediatamente visibile Non usate questo comando con schede HERCULES la scheda viene identificata immediatamente Questa impostazione viene salvata nel file S051 CFG dal comando Options Save options Il default a colori Questo comando imposta la durata dei segnali audio che accompagnano le varie schermate testuali informative Questa impostazione viene salvata nel file S051 CFG dal comando Options Save options Si puo scegliere tra Options Sound Long default Options Sound Short Options Sound None Questo comando imposta varie opzioni per il controllo sul caricamento di file in formato HEX La prima controlla il
7. Alimentazione da applicativo Alimentazione da fonte esterna Alimentatore fornito a corredo Consumo di corrente Connettivita Velocita di comunicazione con PC Frequenqza oscillatore Pagina 4 ATMEL AT89c2051 ATMEL AT89c1051 ATMEL AT89c4051 ATMEL AT89c2051 ATMEL AT89c1051 2m 132 x 66 x 30 mm 120 1 solo MPS 051 0 40 C 24 pins 20 pins 5V 10 14 25V 200mA 230 Vac 12 Vdc Simulatore 90 mA max 50 mA default Programmatore 140 mA max 90 mA default linea seriale RS 232 57600 Baud 11 0592 MHz 24 MHz max MPS 051 Rel 3 00 ITALIAN TECHNOLOGY Ficura 1 Foro MPS 051 Pagina 5 MPS 051 Rel 3 00 e n INSTALLAZIONE Questi paragrafi contengono tutte le informazioni essenziali per connettere MPS 051 al ed installare il software Si prega di leggere completamente questi paragrafi prima di tentare qualunque utilizzo del vostro MPS 051 ATTENZIONE AGLI ESD ELECTROSTATIC SENSITIVE DEVICE Attenzione I danni causati dalla mancata osservazione di queste precauzioni non sono coperti dalla garanzia Le precauzioni nel manipolare il simulatore mirano a prevenire danni all elettronica Il simulatore pu essere danneggiato da cariche elettrostatiche o correnti transitorie Osservare le seguenti regole o regole equivalenti indispensabile Prim
8. I programmatori della grifo possono essere affiancati con vari strumenti aggiuntivi per espanderne il campo di applicazione creare suite complete perfette per l uso professionale ove sia necessario cancellare programmare o simulare i piu diffusi tipi di EPROM ed 1 pit famosi microcontrollori EP 32 Low cost Eprom universal Programmer 32 pin devices EP 32 un potente programmatore di EPROM EEPROM Flash EPROM RAM tamponate ed EEPROM seriali progettato per applicazioni di tipo professionale Inoltre l EP 32 mediante moduli di supporto pu programmare anche microprocessori MCS48 MCS51 PIC AVR GALs ecc MP 51 Micro Programmer for families AVR and 51 MP AVR SI un piccolo ma potente programmatore per microprocessori della serie MCSSI ed Atmel AVR MP AVR 51 anche in grado di programmare EEPROM seriali con interfaccia di tipo 24C xx Microwire 93Cxx ed SPI 25C xx Il programmatore equipaggiato con uno zoccolo ZIF DIP da 40 pin La qualit del programmatore integrata da un comodo programma di controllo MP PIK Micro Programmer per PIC Microchip MP PIK un piccolo ma potente programmatore per microcontrollori Microchip PIC MP PIK anche in grado di programmare EEPROM seriali con interfaccia di tipo IIC 24Cxx Microwire 93Cxx ed SPI 25Cxx Il programmatore equipaggiato con uno zoccolo ZIF DIP da 40 pin La qualit del programmatore integrata da un comodo programma di controllo UEP 48
9. or 17FFH by selected emulated microcontroller Default data displaying immediate after the choose this command 15 from address OOOOH MPS 051 3 00 ITALIAN TECHNOLOGY Name Shortcut View Edit lt F4 gt Fill block Copy block Move block Swap block grito cease e uj Function This command is used to view view mode or edit edit mode data in buffer for viewing 1n DUMP mode only Use arrow keys to select the object to edit Edited data are significed by color Selecting this command fills the selected block of buffer with requested hex or ASCII string Set start and end block for filling and requested hex or ASCII string This command is used to copy specified block of data in current buffer on new address Target address needn t to be out from source block addresses See also Move block This command is used to move specified block of data in current buffer to new address Target address needn t to be out from source block addresses Source address block or part will be filled by topical blank character See also Copy block This command swaps a high and low order of byte pairs in current buffer block This block must started on even address and must have an even number of bytes If this conditions do not fulfil the program modifies addresses itself start address is moved on lower even address and or end address is moved on higher odd address Erase buffer lt Ctrl F2 g
10. single step dell MPS 051 progettata per debuggare il programma utente istruzione per istruzione Tale modalit resa possiblile dalle propriet hardware dei processori serie MCS 51 in particolare la risposta del processore agli interrupt collegati agli inpu INTO INTI Anche se generalmente la letteratura tecnica menziona segnali esterni per questi interrupt possono anche essere generati internamente Certamente il programma di controllo dentro il processore dell MPS 051 tiene contro di questa possibilit Comunque questa tecnica di debugging limitata dal fatto di non poter usare il piedino esterno associato all interrupt selezionato P3 2 o P3 3 il piedino deve essere disconnesso o al pi usato come uscita Sono possibili tre stati nell esecuzione di operazioni in single step STEP RUN e STEP OVER Lo stato di STEP usato per eseguire istruzioni singole nel programma di controllo Lo stato di RUN simile all esecuzione normale con la differenza che possibile inserire i cosiddetti BREAK POINTS esempio inserimenti nel codice standard in corrispondenza dei quali il programma debuggato si ferma e passa in modalit STEP Lo stato STEP OVER esegue istruzioni ACALL o LCALL in un singolo passo ovvero senza mostrare l esecuzione delle singole istruzioni del sottoprogramma Procedura Supponiamo di avere il compilato di un programma che deve essere debuggato in questa modalit Caricate il codice buffer del programma di cont
11. MPS 051 is designed for debugging a user s program by individual instructions This mode is enabled by HW properties of the MCS 51 series processors notably the processor s response to a interrupt level from the INTO or INT1 input While respective catalogues mention an external signal at these inputs interrupts can be generated internally too Certainly the control program in the MPS 051 processor has been completed for this purpose This debugging technique is however limited by the fact that the pin used for generating an interrupt cannot be used P3 2 or P3 3 the pin must remain disconnected At best it may be connected as an output pin Three states are possible in the single step operation STEP RUN and STEP OVER The STEP state is used for moving along individual instructions in the control program The RUN state si similar to the standard program run with the distinction that the debugged program may contain so called BREAK POINTS 1 e insertions in a standard code at which the debugged program stops and passes to the STEP mode The STEP OVER state processes ACALL or LCALL instructions as a single step i e without any insertion Procedure Let us suppose that you have a translated program or its part that should be debugged in this mode Load the code to the MPS 051 control program buffer Depending on which of the pins 1 e P3 2 INT 0 or P3 3 INTM you decide to sacrifice for the single step mode select the respec
12. N E 66 ABOCT MENU G 445454 WE NAV ME ka NA 66 HIPS YS TINI ci 66 WARRANTY lia 67 j li J BI i OO A BA aaa PIU 68 ONMMENICATION ERKOR O alli 68 READING OR PROGRAMMING PROBLEMS 68 ADDIHONALIOO Sigla 69 ALPHABETIC AINDIKeIX pelle 70 MPS 051 Rel 3 00 Pagina V iih n FIGURE 1 FIGURE 2 FiGURE 3 FIGURE 4 FIGURE 5 FIGURE 6 FIGURE 7 FiGURE 8 Pagina VI FIGURES INDEX MPS OSE POI O ran uma res R RR R Sin d e u BA R We ne SA W KORE kU WE 41 DELIVERY CONTENTS 43 JUMPERS SUMMARIZING TABLE 45 EI TABLE iii 45 JUMPERS CONNECTOR AND SOCKETS LOCATION 46 SUPPLY CONNECTOR POLARITY 46 ADAPTOR POD FOR T EMU 52 PpHoTro 57 DELAYS IN EXECUTION OF INTERRUPTS TABLE 58 5 ITALIAN TECHNOLOGY
13. This command is used for debugging application sub program and allows run this program statement by statement Before every execution of this command is necessary to remember that for generates interrupt will be used pin P3 3 INTI hence in application program will not be apply it will apply for internal generating interrupt In step mode is possible to change actual contents of ports P1 and P3 bits P3 3 and P3 6 are masked view and edit internal RAM and some of registers More information about single step mode are in data book for microcontrollers MCS 51 In examples on distribution floppy disk are informations about adjustments of program for single step mode Restrictions and recommendations for single step are in STEP MODE This command is used to view view mode or edit edit mode data in internal RAM of simulator for viewing in DUMP mode only in range 00H 7FH Use arrow keys for select the object for edit Edited data are significed by color There isn t display special function registers SFR by this command The change of contents of some address 1s dangerous because the program blocking entry into this address 20H from 5FH to 7FH User is for this fact noticed by warning Registers lt AIt E gt This command allows view and edit some of registers Registers which maybe edited are displayed with different color attribute and possibility to change value in hexadecimal Value can be edited in binary by using Alt B
14. XT min 512 KB RAM x FDD 3 5 1 x standard serial port min 57600 Baud DISK CONTENT Each MPS 051 simulator programmer delivery encompasses a diskette with a control program and a HELP file You are recommended to copy the diskette content into a selected hard disk catalogue The diskette content may be freely reproduced The delivery also includes a cross translator of the SHAREWARE type which predetermines its operation S2051 EXE a control program for the MPS 051 simulator programmer 5205 1E HLP HELP file 5 5 a directory including a shareware version of ASMSI translator EXAMPLES directory including examples for the simulator EXAMPLE1 ASM EXAMPLE2 ASM Page 48 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ STARTING THE CONTROL PROGRAM Create a new folder on your hard drive copy in it the content of the floppy disk select it as current directory then Type 52051 ENTER at DOS prompt After starting the control program check your checksum CRC If it is O K it will start searching for the MPS 051 at individual physically existing serial ports of the computer Each port is checked at the communication rate of 57600 Baud this being indicated by listings on the display The search operation lasts until the MPS 051 is found or if no MPS 051 is connected until the last serial port is found If
15. alignment of target device in the socket Check the serigraph on the emulator programmer or see the adapter serigraph if using one Update the control program Ifthetarget device has never been programmed before or has been deleted it has returned to blank state Perform Blank check test through Programmer Blanck Chck menu or the keyboard shortcut F6 Some devices may protect the content of their FLASH EPROM thorugh protection fuses This makes absolutely impossible to read the device content but it is not a malfunction MPS 051 Rel 3 00 Page 68 5 ITALIAN TECHNOLOGY _ ADDITIONAL TOOLS grifo programmers can be matched with several additional tools that expand their range of applications and make a complete set suitable for professional use whenever it is needed to erase program or simulate every most diffused kind of EPROM and the most famous microcontrollers EP 32 Low cost Eprom universal Programmer 32 pin devices 32 is a small and powerful EPROM EEPROM Flash EPROM and serial EEPROM programmer and static RAM tester designed for professional mobile applications In addition EP 32 programmer with auxiliary modules support also microprocessors MCS48 MCS51 PIC AVR GALs etc AVR 51 Micro Programmer for families AVR and 51 MP AVR SI is little and powerful portable programmer for MCS51 series and Atmel AVR microco
16. all file formats Mask must contain one of wildcards at least and must be applied correctly by syntax This setting is saved to CFG file by command Options Save This command saves settings You have made in all the settings under the Options menu All options are stored in configuration file on disk with filename S2051 CFG You can select where the configuration file will be created in current directory root directory on drive C or directory where S051 EXE is run from When you start S051 EXE it looks in the current directory for the saved configuration file highest priority If it does not find the filethere it looks for it in the root directory on drive C then in the directory where S051 EXE 15 run from If the file does not exist the program sets default options This command allows You retrieve the settings you ve saved to a 5051 configuration file with the Options Save options command You can select where the configuration file will be loaded from current directory root directory on drive C or directory where S051 EXE is run from Page 65 e Name Shortcut Function QUIT MENU No This command cancels the request to quit Yes The command deallocates heap cancels buffer on disk if exists and returns back to the operation system Yes amp Save The command deallocates heap cancels buffer on the disk 1f exists Saves current setting of last 10 selected devices to file PG4U S
17. by using the contextually sensitive key F1 in the control program The program is preset to the application of an internal oscillator Provided that your simulator hardware is preset to an external oscillator a communication error occurs if its value differs from 11 0592MHz and the program will run in the DEMO mode Use an oscillator command and select the right value of the external oscillator used Then the program finds the MPS 051 NOTE ON SIMULATION MODE The control program can also be started as the BATCH version with the file name parameter In this case the program loads the file content 1n the binary or the Intel HEX format into an external RAM in the simulator starts 1t and returns the control to the operation system The operation corresponds to the GOTO command for the 1000H address The parameter must contain a complete file name The format is distinguished by the extension in the file name if the extension is HEX it 1s considered to be a file in the Intel HEX format in all other cases the file is binary It is supposed that you use the AT89C2051 processor and an internal oscillator ON LINE HELP The description of individual control program commands can be displayed by selecting the HELP F1 key Press F1 twice to obtain all Help options including the Help on HW MPS 051 MPS 051 Rel 3 00 p Page 51 e SINGLE STEP OPERATION MODE The single step mode in the
18. cancellamento automatico del buffer del programma di controllo la seconda imposta l offset negativo usato per modificare l indirizzo di caricamento dei dati in formato HEX in modo da poterli caricare sempre negli indirizzi del buffer Per esempio un file contiene dati in formato Motorola S con indirizzo iniziale FFFFOH Il formato S2 usato ha 3 bytes di address array length Se viene impostato il valore di offset negativo FFFFOH questo verr sottratto al valore specificato nel file quindi il caricamento nel buffer del programma di controllo avverr a partire dall indirizzo 0000H Attenzione dato che l indirizzo viene sottratto dall inidirizzo di caricamento il risultato pu essere un numero negativo Si prega di impostare tale valore con prudenza Questa impostazione viene salvata nel file S051 CFG dal comando Options Save options Come default e disattivato MPS 051 Rel 3 00 ITALIAN TECHNOLOGY Nome Tasti Intel HEX loading Help Set Masks Save options Retrieve options MPS 051 Rel 3 00 p grito bass Funzione Questo comando controlla 1l caricamento dei dati nel buffer del programma di controllo dal files Intel HEX Quindi all utente verr richiesto di inserire un valore per il segmento associato al segmento basso nel file record di tipo 02 e tutti gli altri segmenti verranno modificati di conseguenza Per esempio il file contiene due record di tipo 02 con indirizzi F000H e F
19. comando affiancato dalla combinazione di tasti che lo invoca se esiste e da una breve descrizione di scolo e modalit di utilizzo Si ricorda che la descrizione pi aggiornata di questi comandi disponibile tramite l help in linea che andrebbe consultato prima di questo manuale MENU SIMULATOR Nome Tasti Input lt AIt N gt Output lt Alt P gt Call lt Alt C gt Goto lt Alt G gt MPS 051 Rel 3 00 9 h Funzione Questo comando legge 1 port P1 e P3 e mostra 1 valori letti in binario ed esadecimale P3 6 sempre ad un valore logico alto Usate questo comando per scrivere valori nuovi nei port P1 e del simulatore Questo comando inizia l esecuzione di un sottoporgramma nella RAM esterna dell MPS 051 Il comando attende il ritorno del sottoprogramma chiamato istruzione RET se il sottoprogramma entra in un loop infinito useate 11 comando RESET del simulatore o premete lt ESC gt per un corretto ritorno al monitor La RAM esterno dell MPS 051 non viene influenzata dal RESET L indirizzo specificato deve cadere nel range 1000H 17FFH per AT89C2051 oppure 1000H 13FFH per AT89C1051 Prima di eseguire il salto il contenuto del buffer viene copiato nella RAM esterna dell MPS 051 Nota L utente ha 28 bytes di stack a disposizione se definisce un proprio stack l ndirizzo di ritorno per il monitor viene perduto In tal caso si consiglia di terminare il programma con LJMP 0000 che riporta il monitor al suo stato inizia
20. controllo a partire dall indirizzo OH a patto che non siano impostati i LOCK bits La fine della lettura viene segnalata acusticamente Pagina 25 hi Nome Verify Program MENU FILE Load Save MENU BUFFER View code Pagina 26 Tasti lt F8 gt lt F9 gt lt F3 gt lt F2 gt grifo _ ITALIAN TECHNOLOGY Funzione Prima di attivare questo comando assicuratevi che lo zoccolo del simulatore sia scollegato da qualunque dispositivo Questo comando verifica che 1 dati scritti nel dispositivo inserito nello zoccolo del programmatore corrispondano ai dati memorizzati nel buffer del programma di controllo a partire dall indirizzo 0000H Alla fine della verifica il programma di controllo manda una segnalazione acustica e se ci sono delle differenze scrive un avviso sullo schermo mostrando la prima differenza Primadiattivare questo comando assicuratevi che lo zoccolo del simulatore sia scollegato da qualunque dispositivo Questo comando scrive i dati contenuti nel buffer del programma di controllo a partire dall indirizzo 0000H nel dispositivo che si trovanello zoccolo di programmazione Si possono programmare volendo anche 1 LOCK bits LBI LB2 0 0 FLASH EPROM non protetta 1 0 FLASH EPROM protetta dalla programmazione 1 1 FLASH EPROM protetta da programmazione e lettura Come prima cosail comando controlla il codice di identificazione del dispositivo poi lo cancella e lo
21. dati specificati da un indirizzo ad un altro nel buffer del programma di controllo L indirizzo di destinazione pu ricadere all interno del blocco che viene copiato Vedere anche Move block Questo comando sposta blocchi di dati specificati da un indirizzo ad un altro nel buffer del programma di controllo L indirizzo di destinazione pu ricadere all interno del blocco che viene spostato Il blocco di partenza viene riempito con il carattere di blank Vedere anche Copy block Questo comando scambia byte alto e byte basso nel blocco selezionate nel buffer del programma di controllo Il blocco deve iniziare da un indirizzo pari e deve contenere un numero pari di bytes Se tali condizioni non sono soddisfatte il programma attua automaticamente un compromesso l indirizzo iniziale diventa il primo pari precedente a quello dato e o l indirizzo finale il primo dispari successivo a quello dato Erase buffer lt Ctrl F2 gt Questo comando riempie l intero buffer del programma di Checksum MPS 051 Rel 3 00 9 h controllo col carattere di blank La checksum viene calcolata dopo avere specificato gli indirizzi esadecimali del blocco su cui calcolarla BYTE somma di bytes in word CY ignorato WORD somma di words in word CYignorato BYTE CY somma di bytes in word CY sommato WORD CY somma di words in word CY sommato La colonna NEG contiene la negazione della checksum SUM NEG
22. ha un vantaggio utilizzando una macor per introdurre SW BREAK POINT Per evitare frequenti modifiche al sorgente a seconda della tecnicha di debugging usata si consiglia di usare la compilazione condizionale per esempio with variabili MPS 051 per cambiare l indirizzo iniziale del programma e SSTEP per separare i SW BREAK POINT Esempi che mostrano le possibilit del single step mode si possono trovare nella cartella EXAMPLES sul dischetto PROGRAMMATORE Lasezione di programmatore contiene tutti i comandi necessari per lavorare con la FLASH EPROM dell AT89C1051 o dell AT89C2051 Pagina 16 Usate il comando SELECT per selezionare 1 tipo di circuito Il default AT89C2051 Il comando BLANK CHECK verifica se il circuito sullo zoccolo cancellato Il comando READ legge il contenuto del circuito nello zoccolo e lo salva nel buffer del programma di controllo entro il campo di indirizzi 0000H 07FFH per esempio nell area di lavoro del buffer riservata alla sezione programmatore Il comando VERIFY verifica la programmazione appena effettuata Il comando PROGRAM effettua la programmazione dal buffer del programma di controllo allo zoccolo di programmazione entro il campo di indirizzi OOOOH 07FFH o Inoltre questo comando permette la programamzione dei bit di LOCK 2051 cancellaautomaticamente un circuito prima di programmarlo Il LED rosso sull MPS 051 indica che lo zoccolo programmatore attivo 111 IMPORTANT
23. loading Help Set Masks Save options Retrieve options MPS 051 Rel 3 00 9 h grito bass Function This command is used for data redirecting from file by extended Intel HEX format to physically existing buffer addresses It means that the User will be prompted to enter segment which is associated with the lowest segment in file record type 02 and the other segments will be modified with this difference For example The file contains two records of type 02 with addresses F000H and F800H When entering a new segment for exmple 0H data from segment F000H will bedirect to segment OH and semilar data from segment F800H to segment 800H This options isn t valid for simple Intel HEX format This setting is saved to file PG4U CFG by command Options Save options Default setting means inactive status Use this menu command to install Online context sensitive help system in the desired language You can select english german and slovak coding of Kamenicky or Latin 2 page 852 and without punctuation HELP system You may install the HELP system any time during the run of control program and save the current settings to CFG file on disk Successful installation of anew HELP system supposes HLP files existence on your disk which are delivered on distributions file along with the control program Use this command to set file name masks to use as a filter for file listing in save and load file window for
24. of the internal RAM may not be changed Since the buffer comprises two working areas and since the binary reading of the file from the disk does not enable the user to distinguish between the simulator and the programmer data the binary approach represents a compromise When the data is successfully loaded the programmer s working area is automatically copied to the simulator s working area the area equals the simulated circuit size This operation takes place irrespective of whether the user changed the preset values in the ADDRESS frame of the LOAD FILE working window The following table gives delays in execution of interrupts due to modified calls of interrupt routines in the MPS O51 monitor for individual interrupt sources The time values refer to fOSC 11 0592 MHz FIGURE 8 DELAYS IN EXECUTION OF INTERRUPTS TABLE Page 58 MPS 051 Rel 3 00 ITALIAN TECHNOLOGY grito bass CONTROL PROGRAM COMMANDS The following is a list of all the commands available with control program The command name is matched with is keyboard shortcut if present and a brief descripion of its purpose and employ modalities Please remember that the most recently updated instuctions list for the control program is always the on line help which should be consulted before this manual SIMULATOR MENU Name Shortcut Input lt AIt N gt Output lt Alt P gt Call lt Alt C gt Goto lt Alt G gt MPS 051 Rel 3 00
25. program with pull down menus hot keys and on line help CONVENTIONS AND TERMINOLOGY There are some special conventions and terms used in this manual CONVENTIONS USED IN THE MANUAL References to the control program functions are in capitals e g LOAD FILE etc References to control keys are written in brackets lt gt e g F1 TERMINOLOGY USED IN THE MANUAL ZIF socket Zero Insertion Force socket used for insertion of target device BUFFER Part of memory or disk used for temporary data storage RS 232 serial line Kind of PC port serial which is primarily dedicated to serial devices connection mouse modem scanner etc HEX data format Format of data file which may be read with standard text viewers e g byte SAH is stored as characters 5 and which means bytes 35H and 41H One line of this HEX file one record contains start address data bytes and all records are secured with checksum Page 38 MPS 051 Rel 3 00 n ITALIAN TECHNOLOGY GENERAL FEATURES MPS 051 is a simulator programmer of ATMEL s single chip MCS 51 standard microcontrollers types AT89C2051 and AT89C1051 MPS 051 provides fundamental comfort for work with ATMEL s AT89C2051 and AT89C1051 single chip microcontrollers It eliminates the need for frequent removing reprogramming and inserting individual circuits In addition it enables the
26. that allow to get quickly ready to work Please remark that this is just a summary of the descriptions given in the INSTALLATION chapter which contains detailed instructions and information Please consult also TROUBLESHOOTING chapter if You experience probmems SIMULATION Turn off PC MPS 051 and debugged system Use the jumpers to select the internal oscillator or a debugged system oscillator The same applies to RESET and power supply source Please refer to figure 2 and figure 4 Insert the simulation socket into the debugged system the required socket orientation 15 indicated on the sticker Connect the MPS 051 and the Switch on the debugged system power supply and possibly also the simulator power supply Start the control program you may possibly use the Simulator Find command The program debugging technique is exemplified in the SOFTWARE DESCRIPTION chapter PROGRAMMING If the simulation socket pins are used as input pins remove the simulation socket from the debugged system neither the system nor the MPS 051 may be supplied during this operation Connect the provided external power supply to the coaxial connector of the MPS 051 the power supply must correspond to the values given in the Specifications Start the control program or use the Simulator Find command Insert the programmed circuit into the programming socket its orientation 15 indicated by a notch in the progra
27. the MPS 051 is found by the control program a user display including a control menu will appear Otherwise the program will display an error message and indicates possible reasons When you remove a possible reason press any key The control program makes another attempt to find the MPS 051 If he fails to find it the control program switches over to the DEMO mode which blocks the control commands in the Simulator and the Programmer submenus If you remove the error cause you can give the FIND command to find the MPS 051 at some of the serial ports When the MPS 051 is found You can use it as a simulator or as a programmer NOTE ON STARTING THE PROGRAM BY PARAMETERS When started the program automatically searches for the connected simulator at all existing COMs This procedure may be suppressed by entering a parameter with the COM address to which the simulator is connected In this case the control program finds the simulator directly at the specified COM The parameter form is Ayyy where yyy is the address of the respective COM entered in the hexadecimal form If this parameter 1s used several times each time with a different COM address the program obtains a list of COMs at which the simulator can be searched for The list is also accepted by the SIMULATOR FIND service during program run In addition the parameter is used when the program is started as a BATCH An example of program starting by parameters 52051 A3F8 A2F8 MPS 0
28. user to program the circuit by debugged data after completing his work The unit is supplied from an application sufficient for the SIMULATION part or from an external power source of 14 25V 200mA Itis connected to PC an RS232 serial line The SIMULATOR part design makes use of the unused ports of the standard 40 pin Series 51 processor for the AT89C2051 circuit simulation This function is performed by the 89 51 processor provided with an external RAM memory The latter is used for storing and executing User s programs The processor contains a resident monitor that communicates with the control program operates the internal and the external RAMs and the registers selects a mode and modifies port states An important advantage consists in the possibility to step the program being debugged by individual instructions and to modify the content of the internal RAM of the processor and the registers The monitor does not use interrupts Consequently all of them are available to the user though slightly decelerated by the LJMP instruction to the external RAM area The simulator is connected to the respective application by a flat cable with a crimp socket The PROGRAMMER part provides all programming related functions including reading blank check FLASH programming LOCK bit programming program verification and circuit erasing All MPS 051 functions are controlled by a comfortable control program similar to that used for progr
29. 1 2 position 2 3 connected not connected Use XTALI signal from target system Use internally generated XTALI signal Use XTAL2 signal from target system Use internally generated XTAL2 signal Use RESET signal from target system Use internally generated RESET signal Power supply for MCS 051 is from the target system Disconnect this jumper if supply from target may exceed 5V Power supply for MCS 051 is from its external power supply FIGURE 3 JUMPERS SUMMARIZING TABLE LEDS MPS 051 is provided with two LEDs to visualize the power supply presence and to indicate the internal status Power LED Green When on indicates that the emulator programmer is supplied and working When on indicates that the emulator programmer Status LED Red is programming the device in the socket Leave the device in the socket until this LED 1s off FIGURE 4 LEDs TABLE MPS 051 Rel 3 00 p Page 45 tit XCI RS232 connector XC2 external power supply connector XC3 simulation socket connector Sl precision socket for circuit programming S2 precision socket for ZIF programmming socket installation FIGURE 5 JUMPERS CONNECTOR AND SOCKETS LOCATION A UF 2 FIGURE 6 SUPPLY CONNECTOR POLARITY Page 46 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ QUICKSTART Here are the procedures
30. 1 e del buffer del programma 1 controllo sono sincronizzati ovvero il programma di cotrollo tenta di renderne 1 contenuti identici Quindi 1 contenuto della RAM esterna del simulatore viene aggiornato automaticamente prima di ogni comando CALL GOTO SINGLE STEP caricando 1 dati dallo spazio di lavoro del buffer riservato alla sezione simulatore 1000H 17FFFH o 13FFH Inoltre la sezione simulatore permette all utente di acquisire e modificare 1 valori dei port P1 e P3 con la sola eccezione di P3 6 che non viene usato nei processori AT89C2051 La rappresentazione viene data sia in binario sia in esadecimale I comandi CALL e GOTO vengono usati per il debugging del programma Possono eseguire sottoparti specifiche del programma sottoprogrammi o il programma completo Per eseguire sottoprogrammi CALL dovete conoscerne l indirizzo iniziale per eseguire il programma completo dovete passare il controllo GOTO all indirizzo 1000H questo indirizzo corrisponde allo OOOOH nel circuito standard Il comando CALL attende il ritorno dal sottoprogramma chiamato o il completamento del programma completo Il comando GOTO semplicemente passa il controllo all indirizzo specificato senza attendere 11 completamento della routine Se un sotto programma debuggato entra il un loop senza fine l MPS 051 pu venire resettato dando il comando RESET Si pu uscire da un loop cui si arrivati con un CALL premendo il tasto lt ESC gt Il comando di RESET
31. 41H Una riga di un file HEX un record contiene indirizzo iniziale bytes di dati e checksum MPS 051 Rel 3 00 Pagina 2 5 ITALIAN TECHNOLOGY _ CARATTERISTICRIE GENERALI Il simulatore programmatore MPS 051 progettato per emulare e programmare 1 single chip della ATMEL modelli AT89C2051 e AT89C1051 inoltre pu programmare gli AT89C4051 Il simulatore programmatore MPS 051 permette di lavorare comodamente con 1 microcontrollori single chip ATMEL AT89C2051 e 89 1051 Elimina la necessit di continue rimozioni ripogrammazioni e reinserimenti dei chip Inoltre permette all Utente di programmare il circuito con codice gi debuggato L MPS 051 pu essere alimentato sia dal circuito applicativo sufficiente ad alimentare la sezione di simulazione sia dall alimentatore fornito Si collega al PC tramite linea seriale RS 232 Il progetto della sezione SIMULAZIONE impiega i port non utilizzati del processore standard serie 51 a 40 pin per la simulazione ciruitale dell AT 9C2051 Questa funzione viene effettuata dal processore AT89C51 fornito di memoria RAM esterna Quest ultima viene usata la memorizzazione e l esecuzione del programma Utente Il processore contiene un monitor residente che comunica con il programma di controllo gestisce la RAM interna quella esterna ed 1 registri seleziona una modalit e modifica lo stato dei p
32. 50 NOTE ON SIMULATION 51 ON LINE HELP RM 51 SINGLE STEP OPERATION 52 NOTE ON USING THE STEP OVER lt lt 53 BREAK POINT INSTALLATION INTO THE DEBUGGED PROGRAM 53 DEBUGGED PROGRAM LIMITATIONS IN THE SINGLE STEP MODE 53 PROGRAMMER RM 54 RECOMMENDED PROCEDURE sscsscssscsscssscescsscssscosccsscuscesscuscnsecuscasscsssuscesscuscusccuscaseseees 55 OPERATION EXAMPLE u icsscsssssscsscosscescosscessosccsscusscsscuscesscussascuscasscuscnscsussuscssscuscesscuscnsecess 56 PROGRAM DEBUGGING ecsccssscsscssscescssscessesccescascssscuscsscuscesscuscasssuscuscesssuscnsscuscuscsuccasezeee 57 HARDWARE LIMITATIONS ON THE AT89C2051 CIRCUIT 57 SOFTWARE LIMITATIONS csccssccescosccescoscssccescosscuscasccsscuscssscuscasesuscasccecsuccssscuscuscsuscaseseees 58 CONTROL PROGRAM COMMANDS ccscsscssscoscssscsscssscescssccuscascsescuscesssuscssscuscasesuccnseseee 59 Pagina IV ITALIAN TECHNOLOGY grifo SIMULATOR ME NU O u u i ai 59 PROGRAMMER MENU 55e eu AE u UA RU WAW 3040 4 H W WA NAMUSA FII EAE 61 PILEMEN illa iaia 62 OPTIONS MENU uu 64 0131141801 5XEBWWWWWWADDAAA MM N N MH MJJ NM
33. 51 Rel 3 00 p Page 49 grifo __ ITALIAN TECHNOLOGY SIMULATOR The contents of the external MPS 051 processor RAM and the control program buffer are synchronized which means that the control program tries to make these contents identical Therefore the external simulator RAM content is updated automatically prior to any command CALL GOTO SINGLE STEP by loading data from the buffer working space reserved for the Simulator part 1000H 17FFH or 13FFH Furthermore the Simulator part enables the user to scan and modify the P1 and P3 port values P3 with the exception of P3 6 that is not used in the AT89C205 1 processor The representation is given both in the binary and the HEX formats The CALL and GOTO commands are used for program debugging They start its individual subprograms or the complete debugged program When starting subprograms CALL you must know their initial address when starting the complete program GOTO pass the control to the to the 1000h address this address corresponds to the 0000h address in the standard circuit The CALL command waits for return from the called subprogram or for the completion of the debugged program The GOTO command simply passes the control to the respective address without waiting for routine completion If a debugged sub program gets into an endless loop the MPS 051 can be reset by the respective pushbutton or by the RESET command whose me
34. 7 R READING OR PROGRAMMING PROBLEMS 68 RESET 44 50 RS 232 38 MPS 051 Rel 3 00 p eeeco e J bv Page 71 grifo 5 S2051 EXE 48 SBUFF 50 SIM 2051 48 SIMULATION SOCKET 44 SIMULATOR 39 50 SINGLE STEP 52 SOFTWARE DESCRIPTION 48 SOFTWARE LIMITATIONS 58 STARTING THE CONTROL PROGRAM 49 STEP OVER 52 T TECHNICAL FEATURES 40 TEMPERATURE RANGE 40 TERMINOLOGY 38 TROUBLESHOOTING 68 W WARRANTY TERMS 67 X XTAL 44 7 ZIF 38 Page 72 ITALIAN TECHNOLOGY MPS 051 Rel 3 00
35. 800H Inserendo un nuovo valore per il segmento ad esempio 0000H 1 dati del segmento F000H verranno scritti a partire dall indirizzo 0000H e 1 dati del segmento F800H verranno scritti a partire dall indirizzo 0800H Questa opzione non si applica ai semplici files in formato Intel HEX Questa impostazione viene salvata nel file S05 1 CFG dal comando Options Save options Di default inattiva Usate questo comando per installare l help on line sensibile al contesto nella lingua desiderata Si pu scegliere tra inglese tedesco e lingua slovacca in due diverse translitterazioni L help pu essere installato in ogni momento e l impostazione viene salvata nel file S2051 CFG Si da per scontata la presenza su disco del file HLP che viene fornito col disco di distribuzione Usate questo comando per impostare le estensioni dei file da associare al tipo del file La maschera deve contenere uno dei caratteri jolly del DOS 7 Questa Impostazione viene salvata nel file SO51 CFG dal comando Options Save options Questo comando salva le Impostazioni di tutte le altre voci del menu options Tutte le opzioni vengono memorizzate nel file di configurazione chiamato S2051 CFG Potete decidere se il file deve essere creato nella cartella corrente nella cartella radice di C o nella cartella da cui S2051 EXE stato lanciato Il primo posto dove viene cercato il file di configurazione la cartella corrente seguono la cartella radice di C poi l
36. E I terminali dei port P1 e P3 sono in comune tra lo zoccolo del programmatore e quello del simulatore Quindi per evitare interferenze tra il dispositivo simulato e quello che viene programmato la soluzione migliore disconnettere il cavo di simulazione dal lato MPS 051 Il LED rosso BUSY dell MPS 051 indica che lo zoccolo del programmatore attivo Si consiglia di lasciare il circuito nello zoccolo di programmazione finch il LED non si spegne SI consiglia di non inserire n togliere circuiti dallo zoccolo di programmazione finch il LED rosso di BUSY rimane acceso MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ Ladescrizione dei comandi individuali del programma di controllo pu essere esaminata mediantel help tasto lt F1 gt Premendo F1 due volte appare la lista completa delle opzioni dell help incluse le voci dell HW di MPS 051 PROCEDURA CONSIGLIATA Simulazione Usate 1 jumper per scegliere se usare l oscillatore il segnale di RESET e l alimentazione da scheda target o da fonti interne dell MPS 051 Inserite 11 socket di simulazione nel socket della scheda target dedicato alla CPU AT89C2051 o AT89C1051 L orientamento indicato sull adesivo attaccato al socket Collegate l MPS 051 al PC Alimentate la scheda target e se necessario anche l MPS 051 Alimentate il PC Avviate il programma di controllo se necessario usate 11 men
37. ET on the disk in current directory and returns back to the operation system ABOUT MENU When You choose the Info command from the menu a window appears showing copyright and version information HELP SYSTEM Pressing the F1 key accesses the context sensitive Help If S051 EXE is executing an operation with the programmer F1 generates no response When the Help window is open pressing F1 again causes the program to display the list of all available Help messages You can select and display any of these You may see so called key words in bold and some of these may provide more information if selected cross references The following HELP items are highlighted Words describing the keys referred to by the current Help All other significant words Current cross references press ENTER to obtain further information nactive cross references use the cursor keys to select one of them and acknowledge with lt ENTER gt Since the HELP system is continuously updated together with the control program it may contain information not included in this manual Detailed information on individual menu commands can be found in the integrated on line Help Page 66 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ WARRANTY TERMS The manufacturer gives a guarantee on failure free operation of the device for the period of 12 months
38. F ed altri registri del processore MPS 051 Rel 3 00 Pagina 14 5 ITALIAN TECHNOLOGY _ Il comando FIND viene usato per cercare l MPS 051 presso le porte seriali fisicamente presenti sul PC Sotto il suo menu si puo anche trovare il comando di RESET del simulatore che puo essere dato indipendentemente Comunque il comando RESET viene eseguito automaticamente dopo il completamento di determinate operazioni se sorge il sospetto che il processore si trovi in uno stato indefinito e se si rifiuta di comunicare 1 RESET interno del programma dicontrollo non viene usato se stato selezionato l impiego di un RESET esterno per tale scopo si pu usare 1 meccanismo di RESET della scheda target La selezione degli oscillatori da impiegare se interni o esterni sulla scheda target si effettua mediante 1 comando OSCILLATOR L oscillatore esterno blocca l accesso al dispositivo da programmare non si possono usare PROGAM READ VERIFY and BLANK CHECK L oscillatore esterno viene selezionato tra quelli della lista che viene presentata a seconda della frequenza con una tolleranza di 2 5 La tolleranza indica la variazione ammessa sulla velocit di comunicazione PC MPS 051 la quale viene dedotta dalla frequenza del quarzo selezionato Informazioni pi dettagliate si possono ottenere dall help sensibile al contesto premendo il tasto F1 Il programma preimpostat
39. IAN TECHNOLOGY FiGURA 2 CONTENUTO DELLA CONFEZIONE MPS 051 Rel 3 00 Pagina 7 e INSTALLAZIONE HARDWARE Spegnete sia l MPS 051 che la scheda target Come prima cosa l Utente deve decidere se preferisce usare i quarzi X TAL e controllare il segnale di RESET tramite la scheda target o internamente all MPS 051 stesso Collegate i jumpers JP1 JP2 e JP3 a seconda di ci che avete deciso le connessioni sono esplicate nella figura 3 Per localizzare facilmente i jumper 1 3 potete riferirvi alla figura 5 I jumpers sono saldati sul circuito stampato dentro 1 gusci di plastica per essere raggiunti 1 gusci devono essere separati delicatamente Inserite un capo del cavo RS 232 nell apposito connettore dell MPS 051 inserite l altro capo nel connettore di interfaccia seriale RS 232 del PC COM 1 4 usate se necessario una riduzione Il programmatore simulatore MPS 051 viene fornito con uno zoccolo da 20 pin per l emulazione la cui orientazione visibile sull adesivo che vi attaccato sopra lato colorato del flat corrisponde al pin numero 20 Inserite lo zoccolo del simulatore nello zoccolo della scheda target riservato al microcontrollore 89 205 1 1051 da emulare e la scheda target devono avere la massa in comune NOTA In caso di bisogno procedete come di seguito inserite lo zoccolo di simulazione dell MPS 051 nello zocco
40. ICHE 4 CAVO DI CONNESSIONE 6 COMANDI DEL PROGRAMMA DI CONTROLLO 23 COMPARATORE ANALOGICO 21 CONSUMO DI CORRENTE 4 CONTENUTO DEL DISCO 12 CONTENUTO DELLA CONFEZIONE 6 CONVENZIONI 2 D DEBUGGING 21 DESCRIZIONE SOFTWARE 12 DIMENSIONI 4 E ERRORI DI COMUNICAZIONE 32 ESD 6 ESEMPIO OPERATIVO 20 F FREQUENQZA OSCILLATORE 4 G GARANZIA 31 GOTO 14 Pagina 34 ITALIAN TECHNOLOGY MPS 051 Rel 3 00 ITALIAN TECHNOLOGY T grifo H HELP 15 30 HEX 2 I INDICE ANALITICO 34 INFORMAZIONI PRELIMINARI 2 INSTALLAZIONE 6 INSTALLAZIONE HARDWARE 8 INTO 14 INTI 14 INTRODUZIONE 1 J JUMPERS 9 L LCALL 17 LEDS 9 LIMITAZIONI HARDWARE 21 LIMITAZIONI SOFTWARE 22 M MASSA 4 MENU ABOUT 30 MENU BUFFER 26 MENU FILE 26 MENU OPTIONS 28 MENU PROGRAMMER 25 MENU QUIT 30 MENU SIMULATOR 23 MICROCONTROLLORI PROGRAMMATI 4 MICROCONTROLLORI SIMULATI 4 P P3 2 14 P3 3 14 PROBLEMI IN LETTURA O SCRITTURA 32 PROGRAMMATORE 18 PROGRAMMAZIONE 11 MPS 051 Rel 3 00 p eeeco e J bv Pagina 55 grifo R REQUISITI MINIMI DEL PC 12 RESET 8 RISOLUZIONE DEI PROBLEMI 32 RS 232 2 10 5 SIMULATORE 14 SIMULAZIONE 11 SINGLE STEP 16 STEPOVER 17 STRUMENTI AGGIUNTIVI 33 T TEMPERATURA 4 TERMINOLOGIA 2 X XTAL Z ZIF 2 4 10 Pagina 36 ITALIAN TECHNOLOGY MPS 051 Rel 3 00 5 ITALIAN TECHNOL
41. M PS 051 side The red LED BUSY in the MPS 051 indicates that the programmer socket is live It 15 recommended to leave the programmed circuit in the socket when the LED is lit up Itis recommended to insert or remove circuits into from the programming socket ONLY when the MPS 051 is ON the BUSY LED is not lit up MPS 051 3 00 5 ITALIAN TECHNOLOGY _ The description of individual comntrol program commands can be displayed by means of Help lt F1 gt key When you depress the F1 key twice the control program provides all Help options including the Help for HW MPS 051 RECOMMENDED PROCEDURE Simulation Use the switches to select the internal oscillator or a debugged system oscillator The same applies to RESET Insert the simulation socket into the debugged system the required socket orientation 1s indicated on the sticker Connect the MPS 051 and the PC Switch on the debugged system power supply and possibly also the simulator power supply Start the control program you may possibly use the Simulator Find command The program debugging technique is exemplified at the end of this manual Programming MPS 051 Rel 3 00 p If the simulation socket pins are used as input pins remove the simulation socket from the debugged system neither the system nor the MPS 051 may be supplied during this operation Connect an external power s
42. MPS 051 Micro Programmer and Simulator AT89c1051 89 2051 and AT89c4051 MANUALE UTENTE USER MANUAL Via dell Artigiano 8 6 40016 San Giorgio di Piano g rifo Bologna ITALY ITALIAN TECHNOLOGY E mail grifo grifo it http www grifo it http www grifo com Tel 39 051 892 052 r FAX 39 051 893 661 MPS 051 Edition 3 00 Rel 20 November 2000 GPC grifo are trade marks of grifo MPS 051 Micro Programmer and Simulator AT89c1051 89 2051 and AT89c4051 MANUALE UTENTE USER MANUAL L MPS 051 un simulatore programmatore per 1 microcontrolloti della serie MCS 51 ATMEL AT89C4051 AT89C2051 e ATS9CIOSI Lasezione del PROGRAMMATORE fornisce tutte le funzioni correlate al ruolo di un tipico dispositivo di programmazione quali lettura blank check programmazione della FLASH e dei LOCK bit verifica e cancelazione del circuito Pu programmare 1 chip ATMEL da AT89C1051 fino all AT89C4051 La sezione SIMULATORE fornisce quelle funzioni indispensabili per un debugging efficiente dell applicazione ovvero GOTO CALL SINGLE STEP and STEP OVER execution MPS 051 is a simulator programmer of ATMEL s single chip MCS 51 microcontrollers types AT89C4051 AT89C2051 and AT89C1051 The PROGRAMMER part provides all programming related functions including reading blank check FLASH programming LOCK bit programming program verification and circuit erasing It can program chip
43. MPS 051 Rel 3 00 Pagina I grifo ITALIAN TECHNOLOGY MENU SIMULATOR u u 23 MENU PROGRAMMER 454454444545554545454555A s5 kaka k AW WANA ER d 94 k sU W du b WAW R A WAAR 25 LEE oo 26 MENU BUFFER m 26 MENU OPTIONS e 28 MENU 07 M peem 30 MENUABOU 30 5601 up AER 30 IERMINI DELLA GARANZIA siae 31 RISOLUZIONE DEI PROBLEMI iscsissscssssncssssssacsscssnsesssssdesesseanseassssdessssesecesasssdessssesecssesssacesine 32 ERRORI DICOMUNICAZICNUE 4 4 iy3 4454554444455 awa d k nA s kn lek d a wad kek e 32 PROBLEMI IN LETTURA O SCRITTURA 32 S IRUNENTIAGGIUNTIVI sem W N 33 INDICE ANALITICO m R n BA 34 MPS 051 Rel 3 00 Pagina ITALIAN TECHNOLOGY n gr ifo INDICE DELLE FIGURE BIGURA E Foro MPS UST inei uuu uya ku VA WESANA uqu K HA V n WE HA MA KA dev ee MAW A Ke Ja RE VA Rie 5 FIGURA 2 CONTENUTO DELLA CONFEZI
44. OGY _ INTRODUCTION The purpose of this handbook 15 to give the necessary information to the cognizant and sure use of the products They are the result of a continual and systematic elaboration of data and technical tests saved and validated from the manufacturer related to the inside modes of certainty and quality of the information To be on good terms with the products is necessary guarantee legibility and conservation of the manual also for future references In case of deterioration or more easily for technical updates consult Web site www grifo com or the AUTHORIZED TECHNICAL ASSISTANCE directly To prevent problems during product utilization it 1s a good practice to read carefully all the informations of this manual After this reading the User can use the general index and the alphabetical index respectly at the begining and at the end of the manual to find information in a faster and more easy way Information provided in this manual is intended to be accurate at the moment of release but we continuously improve all our products Please consult the documentation file on the enclosed floppy disk for last minute changes This control program is copyrighted all rights reserved The control program or any part of it may not be analyzed disassembled or modified in any form on any medium for any purpose This document is copyrighted all rights reserved Th
45. ONE 7 FIGURA 3 TABELLA RIASSUNTIVA DEI JUMPERS 9 FICORA TABEEEA ia 9 FIGURA 5 POSIZIONE JUMPERS CONNETTORI E LE D 10 FIGURA 6 POLARIT DEL CONNETTORE DI ALIMENTAZIONE 10 FiGURA 7 DELL ADATTATORE PER T EMU 52 21 FIGURA 8 TABELLA RITARDI IN ESECUZIONE INTERRUPT 22 MPS 051 Rel 3 00 Pagina grifo __ ITALIAN TECHNOLOGY GENERAL INDEX INTRODUCTION PR 37 PRELIMINARY INFORMATION cscssccsscosccsscescosscescosccuscuscsuscuscssscuscesscuscasssuscasesuscnsessseusesscens 38 CONVENTIONS AND TERMINOLOGY ccsscsscosscescosccsscsscoccuscosscuscaccssscasccsscuscssecuscnsecess 38 CONVENTIONS USED IN THE MANUAL 38 TERMINOLOGY USED IN THE MANUAL isscsscosscescssscescasccsscsscesccescasscsscascesscuscasecess 38 GENERAL FEATURES ccccssscsscssccsscoscssecescosscuscosscsscuscesscuscsssuscasesuscascsuscuscnsscuscasesuscasesuseuscnseens 39 TECHNICAL FEATURES ucccscscoscosscescssccescossces
46. Universal Eprom Programmer 48 pin devices UEP 48 un programmatore universale capace di supportare ogni genere di tecnologie del silicio dispositivi programmabili potente pilotaggio dei pin fornisce livelli logici pull up pull down clock ground una tensione Vcc e due tensioni di programmazione su ognuno dei 48 pin indipendentemente Questo concetto di progettazione avanzato permette di programmare quasi ogni dispositivo programmabile in formato DIL fino a 48 pin senza bisogno di adattatori specifici SEEP Serial EEproms Programmer SEEP un piccolo ma potente programmatore per EEPROM seriali in formato 8 pin SEEP mette in grado di programmare EEPROM seriali con interfaccia di tipo 24Cxx Microwire 93Cxx ed SPI 25Cxx Viene supportata la programmazione LV EEPROM 3 3 V Il programmatore e corredato con zoccolo ZIF La qualit del programmatore integrata da un comodo programma di controllo ER 05 Eprom Eraser 05 Cancella tutte le EPROM cancellabili con raggi UV pu cancellare fino a 5 dispositivi timer preprogrammato con tre diverse durate per risparmiare la lampada fornito di alimentatore MPS 051 Rel 3 00 9 h Pagina 33 grifo INDICE ANALITICO A ACALL 17 ALIMENTAZIONE 4 8 AT89C1051 3 4 AT89C2051 3 4 AT89C4051 3 4 AVVIO RAPIDO 11 B BREAK POINT 17 C CALL 14 CARATTERISTICHE ELETTRICHE 4 CARATTERISTICHE FISICHE 4 CARATTERISTICHE GENERALI 3 4 CARATTERISTICHE TECN
47. Utente Le revisioni della documentazione sono implementate nell help prima che nel Manuale Utente Il simulatore programmatore MPS 051 funziona pressoch con tutti i PC compatibili IBM dagli XT ai Pentium Pro sia portatili che desktop Non si richiede alcuna scheda di interfaccia speciale per collegare il PC poich viene usata la porta seriale Il simulatore programmatore MPS 051 funziona impeccabilmente su computers che adottano DOS Windows 3 x e Windows 95 98 come sistema operativo Il simumatore programmatore e pilotato da un programma di controllo facile da usare con men a tendina tasti speciali ed help in linea CONVENZIONI E TERMINOLOGIA Vengono usati in questo manuale alcune convenzioni e termini speciali CONVENZIONI I riferimenti alle funzioni del programma di controllo sono in maiuscolo ad esempio LOAD FILE ecc I riferimenti ai tasti speciali sono scritti in parentesi angolari ad esempio FI TERMINOLOGIA zoccolo ZIF Zoccolo senza sforzo d inserzione Zero Insertion Force usato per ospitare il dispositivo da programmare BUFFER Parte di spazio su disco usato per memorizzazioni temporanee linea seriale RS 232 Tipo di porta del PC seriale dedicata principalmente alla connessione dei dispositivi seriali mouse modem scanner ecc formato HEX Formato di file di dati che pu essere letto da comuni visualizzatori di testo esempio il byte SAH viene rappresentato dai caratter 5 ed A cio dai bytes 35H e
48. a cartella da cui 5205 stato lanciato Se il file non viene trovato vengono usate le impostazioni di default Questo comando permette di ripristinare le 1mpostazioni salvate nel file S2051 CFG con il comando Options Save options Potete scegliere da dove verr letto 1 file di configurazione cartella corrente cartella radice di C o cartella da cui stato lanciato S2051 EXE Pagina 29 grifo p Ek ITALIAN TECHNOLOGY Nome Tasti Funzione MENU QUIT No Cancella la richiesta di uscire dal programma Yes Dealloca lo heap cancella il buffer su disco se esiste e ritorna al sistema operativo Yes amp Save Dealloca lo heap cancella il buffer su disco se esiste salva nel file PGAU SET che si trova nella cartela corrente gli ultimi 10 dispositivi selezionatie ritorna al sistema operativo MENU ABOUT Scegliere il menu ABOUT fa apparire una finerstra che mostra informazioni sul copyright e sulla versione del programma HELP Premendo il tasto F1 si accede all help in linea sensibile al contesto Se in corso una operazione del programmatore la pressione di F1 non genera una risposta Premendo F1 con la finestra di help gi aperta verranno visualizzati tutti 1 messaggi di help disponibili in modo da essere selezionabili e leggibili Potrebbero essere evidenziate in grassetto delle parole chiave selezionandole si possono ottenere ulteriori informazioni cross references Gli
49. a di usare il simulatore toccate un oggetto metallico ampio connesso a massa Non toccate mai i piedini del simulatore n alcun altro contatto metallico dell MPS 051 se non siete certi di essere allo stesso potenziale Ci vale anche per 1 suoi circuiti interni Non togliete le protezioni antistatiche dello zoccolo del simulatore a meno di grave necessita Quando collegate il simulatore ad un altro dispositivo verificate 11 potenziale zero di quest ultimo e del simulatore Idealmente le masse dovrebbero essere collegate da un conduttore di notevole spessore Il simulatore ed il dispositivo a cui viene collegato devono essere spenti Questo vale anche quando si connettono il simulatore ed il PC CONTENUTO DELLA CONFEZIONE La confezione che avete ricevuto deve contenere almeno il seguente materiale Un MPS 051 comprensivo di cavo di emulazione zoccolo ZIF Un disco 3 5 contenente utility software Un disco da 3 5 contenente questo manual in formato pdf Un Alimentatore per la corrente di rete Un cavo di collegamente RS 232 lungo 2 Confezione di cartone CAVO DI CONNESSIONE La velocit di comunicazione relativamente alta tra PC e l MPS 051 richiede un cavo dicollegamento di alta qualit come quello fornito in dotazione Deve essere schermato e la schermatura collegata a massa e la sua lunghezza non dovrebbe eccedere 1 3 metri MPS 051 Rel 3 00 Pagina 6 n ITAL
50. a selected communication rate Output input data can be accessed by the Registers command The command makes it possible to scan and modify the SBUFF register and other processor registers Page 50 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ The FIND command is used for searching for the MPS 051 at all physically present PC s serialports This command includes the simulator s RESET that can also be called independently The effect of this command upon the simulator control processor 1s the same as that of depressing the resetting pushbutton In addition the RESET command is automatically executed after some operations if the processor is suspected to be in an undefined state and if rejects to communicate the control program RESET 15 not used if you use an external RESET use the debugged application reset mechanism for this purpose To generate a time based frequency of the simulator select an internal or an external oscillator by the OSCILLATOR command The external oscillator blocks the access to the programmed circuit unpermitted options BLANK CHECK READ VERIFY and PROGRAM An external oscillator is selected from the option of permitted types according to the frequency the tolerance being 2 5 The tolerance delimits the range of smooth PC simulator communication at the transmission rate derived from the applied oscillator value Details can be obtained
51. alizzati con un colore diverso Questo comando non viene usato per mostrare il contenuto degli SFR Special Function Registers Cambiare il contenuto di certi indirizzi 20H e da 5FH a 7FH puo essere pericoloso poich sono usati dall MPS 051 L utente viene avvisato mediante un messaggio di avvertimento Questo comando permette di visualizzare e o modificare alcuni registri I registri modificabili vengono visualizzati con un colore diverso ed possibile specificare il nuovo valore diverso in esadecimale Il nuovo valore si puo dare in binario premendo lt Alt B gt Alcuni bit nei registri modificabili sono fissi Ulteriori informazioni si possono trovare nella schermata del programma Questo comando cerca l MPS 051 su tutte le porte seriali presenti 51 puo anche usare per passare da DEMO a READY e viceversa MPS 051 Rel 3 00 ITALIAN TECHNOLOGY Nome Tasti Reset lt Alt R gt Oscillator lt Alt O gt Automatic reload MENU PROGRAMMER Select lt F5 gt Blank Chk lt F6 gt Read lt 7 gt MPS 051 Rel 3 00 I My grito bass Funzione Questo comando genera il segnale di reset per l MPS 051 Viene eseguito automaticamente dopo il completamento di Simulator Call e Simulator Single Step Nota Il comando RESET non disponibile se la fonte di reset la scheda target Questo comando si usa insieme all impostazione dei jumpers JPI e JP2 che selezionano se usare gli oscilla
52. ammers and simulators The control is menu driven and makes use of hot keys The program contains an internal buffer of program allowing for binary form editing Furthermore the buffer can be scanned in the MCS51 source form files of different formats can be read written etc MPS 051 Rel 3 00 p Page 59 hi TECHNICAL FEATURES GENERAL FEATURES Microcontrollers simulated Microcontrollers programmed Serial cable PHYSICAL FEATURES Dimensions Mass Temperature range ZIF socket Emulation socket ELECTRIC FEATURES Power supply from application Power supply from external source Power supply provided Current consumption Connectability Communication rate with PC Oscillator frequency Page 40 grifo _ ITALIAN TECHNOLOGY ATMEL AT89c2051 ATMEL AT89c1051 ATMEL AT89c4051 ATMEL AT89c2051 ATMEL AT89c1051 2m 132 x 66 x 30 mm 120 g MPS 051 only 0 40 C 24 pins 20 pins 5V 1090 14 25V 200mA 230 Vac 12 Vdc simulator 90 mA max 50 mA default Programmer 140 mA max 90 mA default RS 232 serial line 57600 Baud 11 0592 MHz 24 MHz max MPS 051 Rel 3 00 ITALIAN TECHNOLOGY I FIGURE 1 MPS 051 MPS 051 Rel 3 00 _ Page 41 e INSTALLATION These paragraphs
53. aning 15 the same You can also return from the endless loop following the CALL command by pressing the ESC key Depressing the resetting pushbutton or using the RESET command do not affect the content of the external RAM in the MPS 051 The SINGLE STEP BY INTO INT1 command is used for debugging an application sub program by stepping individual instructions Prior to calling one of these commands depending on whether you use the P3 2 INTO or the P3 3 INTI pin for generating an interrupts you are supposed to determine the pin which will be disconnected such a pin will be used internally for generating an interrupt The PortIN PortOut Registers and View Edit int RAM from the Simulator submenu can be used during the single step operation Further details on the single step mode are given in the MCS 51 series processor catalogues or in related literature The following part of this manual presents the description of using this mode in the MPS 051 Examples on the MPS 051 diskette provide relevant information on program modifications The internal RAM of the processor can be accessed for the sake of both reading and writing by the View Edit internal RAM command Any attempt to write on the addresses reserved for the internal monitor in the MPS 051 processor is blocked This bears on the 20H and 5FH through 7FH addresses stack The BAUD command sets up all necessary processor registers in the MPS 051 to enable the serial port to be used at
54. ard minimo da 57600 baud CONTENUTO DEL DISCO Ogni MPS 051 viene fornito con un dischetto contenente un programma di controllo ed un file di HELP Si consiglia di fare una copia del contenuto del disco in una cartella specifica sul disco rigido Il contenuto del disco puo essere copiato liberamente Viene fornito anche un cross traduttore di tipo SHAREWARE che predetermina le proprie operazioni S2051 EXE programma di controllo per 5 051 S2051E HLP file di HELP ASM5SIN cartella contenente la versione shareware del traduttore ASM51 EXAMPLES cartella contenente gli esempi per il simulatore EXAMPLE1 ASM EXAMPLE2 ASM MPS 051 Rel 3 00 Pagina 12 5 ITALIAN TECHNOLOGY _ LANCIARE IL PROGRAMMA DI CONTROLLO Create una nuova cartella sul vostro disco rigido copiateci il contenuto del floppy disk selezionate la cartella come directory corrente poi Digitate 5205 ENTER al prompt del DOS Dopo aver lanciato il programma di controllo viene verificato il checksum CRC Se va tutto bene il programma inizier a cercare l MPS 051 su tutte le porte seriali fisicamente installate sul computer Su ogni porta la ricerca viene fatta a 57600 Baud come viene indicato sul display L operazione di ricerca dura finch non viene trovato un MPS 051 o se non connesso alcun MPS 051 Se viene trovato un MPS 051 verr mostrato un messaggio per l
55. arget Scollegare questo jumper se tale alimentazione pu superare 1 5V connesso L alimentazione del MCS 051 presa non connesso dall alimentatore In dotazione FIGURA 3 TABELLA RIASSUNTIVA DEI JUMPERS LEDS MPS 051 fornito di due LEDs per indicare la presenza dell alimentazione e per visualizzare il proprio stato interno ow DESCRIZIONE i BD di Quando acceso indica che 5 051 alimentato Quando acceso indica che l MPS 051 sta LED di stato Rosso programmando 1l dispositivo nel socket Non aprite il socket quando questo LED acceso FIGURA 4 TABELLA DEI LEDs MPS 051 Rel 3 00 p Pagina 9 ee mr XCI connettore RS 232 XC2 connettore per l alimentazione esterna XC3 connettore del socket di simulazione Sl socket di precisione per la programmazione S2 socket di precisione per installare il socket ZIF per la programmazione FIGURA 5 POSIZIONE JUMPERS CONNETTORI E LEDs air FIGURA 6 POLARIT DEL CONNETTORE DI ALIMENTAZIONE Pagina 10 0 G LED E MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ AVVIO RAPIDO Vengono qui presentate alcune procedure per mettersi rapidamente al lavoro Ricordate che questo solamente un sommario delle informazioni fornite nel capitolo INSTALLAZIONE il quale contiene istruzioni dettagliate Potere anche cons
56. cally This setting is saved to file S2051 CFG by command Options Save options Default set is color This command sets intensity of sound signals that accompany the displaying of any text informations This setting is saved to file PG4U CFG by command Options Save options It s possible to select one of the following options Options Sound Long default Options Sound Short Options Sound None This command sets several options for loading control by any of HEX formats The first option sets erasing buffer automaticaly before loading by any of HEX formats The second option sets a negative offset which is used for data addresses modification by loading from any HEX file so that data can be written to existing buffer addresses For example A file contains data by Motorola 5 format A data block started at address FFFFOH It is in 52 format with 3 bytes of address array length For each read data You can set a value of negative offset to FFFFOH It means that the offset will be subtracted from current real addresses and so data will be written from buffer address 0 Warning a negative offset is subtracted from real address and therefore a result of subtraction can be a negative number Please take care of correct setting of this value This setting is saved to file PG4U CFG by command Options Save options Default setting means inactive status MPS 051 Rel 3 00 ITALIAN TECHNOLOGY Name Shortcut Intel HEX
57. card please refer to the Data Book of the builder or second sources SYMBOLS DESCRIPTION In the manual could appear the following symbols Attention Generic danger AN Attention High voltage Trade Marks GPC grifo are trade marks of grifo Other Product and Company names listed are trade marks of their respective companies ITALIAN TECHNOLOGY gr ifo INDICE GENERALE TN 4810782 L8 T u 1 INFORMAZIONI PRED EVEINA R T uuu uzun uu 2 CONVENZIONEE TERVMINOLOG Suysa ewe Ne EUR 2 CONVENZIONI pee uu uuu un unas 2 TEERIWEENOLOGIA iaia 2 CARALIERISTICHE GENERA LL NA A u 3 CARAT TERTS FICHE TECNICHE u uu uu uuu usaspa a N aa ya 4 CARALTERISTICHE GENERA 4 CARATTERI FICHE MN rr 4 CARALIERISIICHE ELEITRICHE ES 4 TNS TALIA YV IND S uuu u Qu u uu Sanu uuu uuu 6 ATTENZIONE AGLI ESD ELECTROSTATIC SENSITIVE DEVICE 6 CONTENUTO DELLA CONFEZIONE E 6 CAV O DI CONNESSIONE am 6 INSTALLAZIONE HHA RD WARES
58. contain all the information essential to connect MPS 051 to the PC and install the software Please read completely these paragraphs before attempting any use of Your programmer CAUTION FOR ESD ELECTROSTATIC SENSITIVE DEVICE Caution Faults due to a User s failure to observe these precautions are not covered by the guarantee Simulator handling safety precautions aimed at preventing it from electric damage The simulator may be damaged by electrostatic discharge or transient current Itis advisable to follow the following precautions or equivalent rules Prior to operating your simulator touch a larger metal or a grounded object Never touch simulation base outlets if you are not certain about zero potential relative to the simulator This also applies to all simulator internal circuits and the connecting cable outlets Do not remove the antistatic sponge protection from the simulation socket unless necessary When connecting the simulator to another device check the grounds of both units for zero potential Ideally the grounds should be conected by a thicker conductor The simulator and the device to be connected must be OFF This also holds for interconnecting the simulator and the PC DELIVERY CONTENTS The package You have been delivered must contain at least the following items 1 MPS 051 simulator including an emulation cable including ZIF socket 1 diskette 3 5 with utility software 1 diskette 3 5 wit
59. cuscssscuscesscuscasscuscusesuscuscesscuscasscuscusssescasesesensenssens 40 GENERAL FEATURES ccccsscoscsscsscosccescosscuscasccsscuscesscuscesscuscesssuscasseuscuscssscuscssscuscasscuccnsecees 40 PHYSICAL FEATURES RM 40 ELECTRIC FEATURES ncsccscosscsscosccsscescosscuscesccessuscsuscuscssssuscesssuscusesescuscesscuscusscuscasesucsaseseses 40 INSTALLATION RR 42 CAUTION FOR ESD ELECTROSTATIC SENSITIVE DEVICE 42 DELIVERY CONTENTS ucccccccosscoscosscescssccessesccsscuscssscuscesscuscusssuscuscsescuscssscuscesscuscasesuseaseesees 42 CONNECTION CABLE Wicsccsscosscsscssccsscescosscescosscuscasscuscuscssscussssccuscasssuccasessssaccesccuscssscuscnsecess 42 HARDWARE INSTALLATION 44 JUMPERS RM 45 IB MM n NH HHH HM BN A 45 010 CO CH V N e HNH E UU NMMTR REH H nm 47 SIMULATION VLEDWAWAMAna HH HH JJJM M 47 Ig ere VATIC 47 SOFTWARE DESCRIPTION ccccssscoscosscescssccescesccsscuscesscuscssssuscasssescuscesscuscasscuscasesuscasessscuscsseens 48 MINIMAL PC REQUIREMENTS ccscsscosscescosscescosscescasscuscusccsssuscesscuscusecuscnsssuscnscceseuseeseees 48 DISK CONTENT DAWA MM HH nnn 48 STARTING THE CONTROL PROGRAM cacs s ssseseseeeeesessssssseeeseee tt sss5555eee eeez 49 NOTE ON STARTING THE PROGRAM BY 49 STIMULATOR S ODA HNH JJM
60. d altri tipi di ambiente Descrizione completa della configurazione hardware del PC Descrizione completa della configurazione software del PC Se il materiale giunge senza descrizione del problema la riparazione pu essere respinta Analogamente non s1 pu garantire la riparazione se non vengono inviati anche tutti gli accessori esterni usati quando stata riscontrato il difetto Richieste di riparazioni non necessarie o fuori garanzia verranno addebitate La garanzia non copre danni prodotti da usura manipolazione da parte di personale non qualificato danni meccanici modifiche o riparazioni non autorizzate danni occorsi durante un trasporto o contatto con sorgenti di alta tensione quali linee di alimentazione o generatori Il servizio assistenza clienti garantito durante ed oltre il periodo di garanzia Pagina 31 MPS 051 Rel 3 00 p e RISOLUZIONE DEI PROBLEMI In caso insorgano dei problemi leggete attentamente le operazioni di installazione e di utilizzo di hardware e software un altra volta probabilmentela risposta al vostro problema si trova li Se il problema dovesse persistere riferitevi alle indicazioni qui sotto ERRORI DI COMUNICAZIONE Il dispositivo deve essere alimentato correttamente quindi 11 LED verde di alimentazione deve essere acceso e l alimentatore usato deve essere quello fornito in dotazione Per testare l integrit del cavo torcetelo delicatamente durante i
61. di pull up portano a 5V il livello logico 1 durante il processo di simulazione Di sicuro necessaria una alimentazione di almeno 1 9 V peri livelli logici L alimentazione del simulatore non influisce su quella della scheda target poich sono separate da un diodo Se il jumper JP4 disconnesso 1l valore della Vcc sulla scheda target pu eguagliare il massimo valore tollerate dall AT89C2051 ovvero 6V Corrente massima per livelli logici bassi 1 6 mA 0 45V solamente Al contrario dell AT89C2051 il simulatore provvisto di comparatore analogico Per assicurare una comunicazione corretta tra MPS 051 il tramite porta seriale il valore del cristallo sulla scheda target deve corrispondere a quello fornito nel menu Simulator Oscillator External Per rimediare alla mancanza del comparatore analogico possibile usare un altro emulatore hardware per la famiglia 51 il T EMU 51 in abbinamento con l adattatore qui sotto descritto Adattatore T EMU 52 ed altri emulatori Convertitore 87C5 1 AT89C205 1 Conversione tra AT89C2051 4051 87C51 Comprende un comparatore analogico Possibilita di scollegare 1 0 20 1 0 40 1 1 20 1 1 40 Pagina 21 iih n LIMITAZIONI SOFTWARE Lo stack del monitor inizia all indirizzo della RAM esternal sull MPS 051 Per il procedimento di debugging mediante istruzione CALL disponibile a partire dall indirizzo 63H quindi puo essere lung
62. e tutti 1 diritti sono riservati N il programma di controllo n alcuna sua parte possono essere disassemblati analizzati o modificati in alcun modo o con alcun mezzo per nessuno scopo Questo documento protetto dalle leggi sul diritto d autore tutti 1 diritti sono riservati pertanto non puo essere copiato riprodotto o tradotto in alcun modo o con nessun mezzo n interamente n in parte senza un permesso scritto della grifo La grifo non si assume alcuna responsabilit per un uso errato del presente manuale La grifo si riserva il diritto di effettuare cambiamenti o miglioramenti al prodotto descritto nel presente manuale in ogni momento senza dover dare alcuna comunicazione preventiva Il presente manuale contiene nomi di compagnie software prodotti ecc che sono registrati dai legittimi propietari La grifo rispetta tali diritti di propriet Pagina 1 MPS 051 Rel 3 00 p e n INFORMAZIONI PRELIMINARI Questo manuale spiega come installare ed usare il programma di controllo ed il vostro simumatore programmatore MPS 051 Si assume che l Utente abbia una minima esperienza con PC e con l installazione di software comunque il capitolo AVVIO RAPIDO vi guider passo dopo passo attraverso tutta la procedura di installazione Una volta installato 1 programma di controllo si consiglia di riferirsi sempre all help sensibile al contesto del programma stesso piuttosto che al presente Manuale
63. e usato in single step il pin non utilizzabile dipende dall interrupt usato Non si possono disabilitare tutti gli interrupt esempio l istruzione CLR EA Non si pu disabilitare l interrupt esterno usato per il single step esempio l istruzione CLR E0 non pu essere usata nel programma debuggato se si usa INTO per il single step l istruzione CLR non pu essere usata nel programma debuggato se si usa INT1 per il single step Non si pu modificare la priorit degli interrupt piu precisamente l interrupt usato per il single step deve avere priorit massima MPS 051 Rel 3 00 Pagina I7 iih n Non si pu cambiare il tipo di interrupt usato per il debugging il tipo di interrupt viene impostato nel registro TCON 22B dello stack sono disponibili per 11 debugging in single step mode Se create 1l vostro stack l indirizzo di ritorno per il monitor viene perduto dopo aver terminato il modo SINGLE STEP In tale STEP stato il programma da una segnalazione e RESETtta automaticamentel MPS 051 In modo RUN normalmente si ha un loop senza fine La routine di utility in debugging modifica 1 seguenti indirizzi nella RAM interna del processore 20h 59h 5Ah 5Bh 5Ch 5Dh 5Eh Impstando i BREAK POINTS la dimensione del programma debuggato non puo eccedere la dimensione della memoria del processore emulato tenendo conto delle limitazioni dovute al modo STEP OVER NOTE Si
64. ection of F8 results in rewriting the user s program at the above mentioned addresses No check is done for this purpose on the part of the program NOTE ON USING THE STEP OVER A case may happen that the ACALL routine contains a user s break point The program accepts it and stops If you use the RUN lt Alt U gt command at this moment you can safely return from the routine by accrepting the forced break point in the reserved area of the external RAM The RUN command may be replaced by simple single step operation F7 It should be however noted that after leaving the ACALL LCALL routine the program is in a reserved area and the forced break point instructions will follow It is only after their execution that the control returns to the instruction following the ACALL LCALL BREAK POINT INSTALLATION INTO THE DEBUGGED PROGRAM BREAK POINT sequence for the INTO interrupt clr P3 2 setb nop BREAK POINT sequence for INTIN interrupt clr P3 3 setb EXI nop DEBUGGED PROGRAM LIMITATIONS IN THE SINGLE STEP MODE The P3 2 for INTO or the P3 3 for INT1 pin cannot be used in the single step mode pin not to be used is determined by an external interrupt selected You cannot disable all interrupts simultaneously by means of the CLR EA instruction You cannot disable the external interrupt used to generate a debugging interrupt 1 e the clr EO instruction may not be used in the debugged
65. elementi evidenziati sono Parole che si riferiscono a comandi descritti nell help corrente Tutte le altre parole significative Cross reference corrente premete Enter per ottenere ulteriori informazioni Cross references non selezionati per selezionarlo usate 1 tasti freccia e confermatelo con Enter Poich il sistema di help viene continuamete aggiornato con il programma di controllo puo contenere informazioni non incluse in questo manuale Informazioni dettagliate sui comandi individuali dei menu si possono trovare nell help in linea integrato Pagina 30 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ TERMINI DELLA GARANZIA Il produttore assicura un periodo di 12 mesi esente da difetti del dispositivo a partire dalla data di consegna evidenziata nella bolla Se un MPS 051 evidenzier un difetto di fabbricazione verr riparato se coperto da garanzia Si prega di contattare la grifo per accordarsi sulle modalit di spedizione Per accettare l articolo in riparazione comunque indispensabile restituirlo con la confezione originale in buono stato e tutto il suo contenuto ovvero cavo di comunicazione e alimentatore una descrizione completa ed esauriente del problema riscontrato e delle circostanze in cui si verificata Versione del programma di controllo Possibili interferenze ambientali uffici laboratori industriali e
66. er processing S2051 SET file Filename and enabling of automatic load are stored to file S2051 SET by command Quit Yes amp Save Use this command for select AT89C1051 or AT89C2051 or AT89C405 1 device type before access to device on programming socket Device AT89C4051 can be selected only if the BIOS version is 3 00 or above This command allows to check the all device its erasing The program reports the end without error or with the error by sound signal and it writes the warning report on the display Before select this command be sure that simulation socket1s disconnect from developed equipment This command allows to read programmed data from the device in the programming socket into the buffer from address OH 1f doesn t set LOCK bits 1 and 2 The end of the reading 1s indicated by the sound signal Before select this command be sure that simulation socket is disconnect from developed equipment Page 61 Cra E Name Verify Program FILE MENU Load Save BUFFER MENU View code Page 62 Shortcut lt 8 gt lt F9 gt lt F3 gt lt F2 gt grifo _ ITALIAN TECHNOLOGY Function This command checks the programmed data if doesn t set LOCK bits and 2 It compares content of the device with data in buffer from address OH The program reports the end of verifying without error or with the error by sound signal and it writes the warning report and first error on
67. from the date of delivery as given in the delivery note If a simulator failure results from a defect in workmanship we shall repair the device as if under guarantee The device must be delivered for repair in the original packing including all accessories a copy of purchase document and the description of failure in writing In reasonable cases please supply the description of circumstances accompanying the failure Control program version Environment in view of possible interference office laboratory industrial and other environment types Description of your PC hardware name type rate printer port type integrated on a card a multi I O card a disk controller card I O rate Description of your PC software type and version of your operating system OS system Shell Commander Windows resident programs used If your claim is sent without failure description enclosed we shall have to render an account for the time needed for ascertaining these facts Moreover we do not guarantee to adjust your claim appropriately if the programmer 1s not delivered with all the accessories when the failure is outside the device itself Unjustified claims will be charged The guarantee does not apply to common wear failures due to unqualified handling and or through mechanical damaging It does not cover damage caused by improper modification or repair shipping or high voltage surges from external sources suc
68. gging SADR EQU 0000h 1B for programming into the processor BOC EQU 002Bh BEGIN_OF_CODE program start address of the AT89C2051 1051 processor this adress must be higher than or equal to the 002Bh address this part includes the definitions of variables and constants program code beginning all ORG directives to be written in the ADR form org ADR BOC org ADR 0000h program start address following reset lmp START jump to program start org ADR 0003h beginning of the interrupt vector from INTO org ADR 000Bh beginning of the interrupt vector from TO org ADR 0013h beginning of the interrupt vector from INTI org ADR 001Bh beginning of the interrupt vector from T1 org ADR 0023h beginning of the interrupt vector from the serial port START the first program instruction END end of program The translation of the program to be debugged in the MPS 051 contains a note in the form of the 1B line which means that the program code will be stored in the MPS 051 RAM starting with the 1000h address as required by the simulator A program translated in this way would not work in the AT89C205 1 1051 whose addresses range from 0000 07FF Therefore the note must include a line labelled as 1A In addition itis necessary to make the 1B line valid and program the translated code into the processor Page 56 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY
69. h as power line or connected equipment Customer service within and after the guarantee period is provided by the manufacturer MPS 051 Rel 3 00 p Page 67 e ni TROUBLESHOOTING We really want you to enjoy our product Nevertheless problems can occur In such cases please read carefully all the enclosed documentation again Probably you will find the needed answer right away Should the problem persist please follow the instructions below COMMUNICATION ERRORS Programmer must be supplied correctly so the green supply LED must be ON and the power supply must be the one delivered with the programmer To test the supply cable s physical integrity twist it delicately and see if something changes Update the control program often a more recent version includes enhancements also in communication reliability Please refer to FREE SOFTWARE UPDATES paragraph for more information The serial cable must be the one delivered with the programmer or a cable with all the pins connected To test the cable s physical integrity twist it delicately when 5051 tries to connect to the emulator programmer and see if something changes Try to install emulator programmer and S051 EXE on another computer If Your system works normally on the other computer you might have a problem with the first one PC Compare differences between both computers READING OR PROGRAMMING PROBLEMS Assure the correct
70. h this manual in pdf format mains adapter RS 232 connection cable transport package CONNECTION CABLE The relatively high communication rate between the PC and the MPS 051 requires a high quality connection cable like the one in the delivery package It must be shielded shielding connected to GND and its length should not exceed 3 m Page 42 MPS 051 Rel 3 00 n ITALIAN TECHNOLOGY FiGURE 2 DELIVERY CONTENTS MPS 051 Rel 3 00 Page 43 e HARDWARE INSTALLATION At the beginning the User must decide whether he she prefers cycling X TAL and controlling the RESET signal of the simulator from the debugged application to their generating internally in the MPS 051 Connect the JP1 JP2 and JP3 jumpers according to your decision The respective settings are specified in the table of figure 2 To easily locate jumpers JP1 3 please refer to figure 4 The jumpers are located on the PCB inside the two plastic shells so they must be carefully separated Insert one end of the RS 232 connection cable to the MPS 051 and the other end to the RS 232 interface connector COM 1 4 of your computer and use an appropriate reduction if needed The MPS 051 simulator programmer is fitted with a 20 pin simulation socket Its orientation follows from the sticker The colour wire corresponds to pin No 20 Insert the s
71. imulation socket into the simulated microcontroller socket as an AT89C205 1 1051 circuit The debugged system and the PC must be commonly grounded Both the MPS 051 and the device under development must be OFF during this operation NOTE In case of need proceed as follows insert the MPS 051 simulation socket into the device under development in such a way that pin No 10 GND is the first to come into contact with the device socket Alternatively first connect your MPS 051 to the device under development and only then connect it to the PC the RS232 interface is more resistant than processor ports An inappropriate connection procedure may result in damaging the processor in the MPS 051 by equalizing currents between the MPS 051 and the PC It is necessary for you to select the method of MPS 051 supplying either from the system being debugged or from an external power supply The JP4 jumper is designed for cutting off the MPS 051 supply from the simulation socket Remove it if the application supply may exceed 5V Certainly the MPS 051 from an external power supply and the application from a different power supply may be supplied separately with the JP4 jumper connected provided that the above given condition is met To easily locate jumpers JP4 please refer to figure 4 When the MPS 051 and the computer are connected and the simulation socket is inserted in the system being debugged you can switch ON the power supply When using a
72. is document or any part of it may not be copied reproduced or translated in any form or in any way without the prior written permission of grifo grifo assumes no responsibility for misuse of this manual grifo reserves the right to make changes or improvements to the product described in this manual at any time without notice This manual contains names of companies software products etc which may be trademarks of their respective owners grifo respects those trademarks MPS 051 Rel 3 00 p Page 57 e PRELIMINARY INFORMATION This manual explains how to install the control program and how to use Your programmer It 1s assumed that the User has some experience with PCs and installation of software however the Quick start chapter will guide You step by step through the complete installation process Once you have installed the control program we recommend You consult the context sensitive HELP within the control program rather than the User s Manual Revisions are implemented in the context sensitive help before the User Manual The programmer works with almost any IBM compatible PC from XT to Pentium Pro portable or desktop personal computers No special interface card 15 required to connect to the PC since programmers uses the serial port All programmers function flawlessly on systems running DOS Windows 3 x and Windows 95 98 The programmer 15 driven by an easy to use control
73. key too In some registers with possibility to change value are any bits masked More informations are in Edit contents of registers Find lt Alt F gt The command finds simulator on all present COMs of PC It is Page 60 used for switch control program to DEMO READY mode too MPS 051 3 00 ITALIAN TECHNOLOGY Name Shortcut Reset lt Alt R gt Oscillator lt Alt O gt Automatic reload PROGRAMMER MENU Select lt F5 gt Blank Chk lt F6 gt Read lt F7 gt MPS 051 Rel 3 00 p grito cease e uj Function Command generate reset signal for the MPS 051 Command is executed automatically after finished of commands SIMULATOR CALL and SIMULATOR SINGLE STEP Note Command RESET is not available if reset signal is generated from developed equipment This command correspondes with switchers JP1 and JP2 which are switched by option internal or external oscillator Select one ofitems which are available after Enter pressed Identification of simulator at new communication speed depending on oscillator frequency will be executed immediate after choice new type and frequency of oscillator This command enables or disables automatic reload of changed debugged file before executing any simulation command Simulator Call Simulator Goto Simulator NSingle step by INTO Simulator WSingle step by INT1 This command also enables automatic loading of debugged file at start program aft
74. l funzionamento Aggiornate spesso il programma di controllo I miglioramenti apportati includono anche maggiore affidabilit nella comunicazione Riferitevi al paragrafo AGGIORNAMENTI SOFTWARE GRATUITI per ulteriori informazioni cavo di comunicazione seriale usato deve essere quello fornito in dotazione o un cavo con tutti i contatti collegati Per testarne l integrit torcetelo delicatamente mentre il programma di controllo cerca di collegarsi con il dispositivo e vedete se qualcosa cambia Provate ad installare 1 programma di controllo su un altro computer Se il sistema funziona correttamente su un altro computer allora il problema risiede nell altro computer Confrontate le due macchine PROBLEMI IN LETTURA O SCRITTURA Assicuratevi che il dispositivo sia allineato correttamente consultando la serigrafia presso lo zoccolo in cui inserite 11 dispositivo Aggiornate il programma di controllo Seil target da programmare mai stato usato prima o stato cancellato si trova nello stato di blank Verificate l evenienza con il menu Programmer Blanck Chck o premendo 1 tasto F6 In alcuni casi 1l contenuto della FLASH EPROM potrebbe essere protetto Cio rende assolutamente impossibile leggerlo tuttavia non si tratta di un malfunzionamento Pagina 32 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ STRUMENTI AGGIUNTIVI
75. le Questo comando inizia l esecuzione del programma contenuto nella RAM esterna dell MPS 051 a partire dall indirizzo specificato Il comando non attende il ritorno del programma Non possibile comunicare con il simulatore mentre il programma in esecuzione Se il programma entra in un loop infinito useate 1 comando RESET del simulatore o premete lt ESC gt per un corretto ritorno al monitor La RAM esterno dell MPS 051 non viene influenzata dal RESET L indirizzo specificato deve cadere nel range 1000H 17FFH per AT89C2051 oppure 1000H 1 per AT89C1051 Prima di eseguire il salto 1 contenuto del buffer viene copiato nella RAM esterna dell MPS 051 Nota L utente ha 30 bytes di stack a disposizione se definisce un proprio stack l ndirizzo di ritorno per il monitor viene perduto In tal caso si consiglia di terminare il programma con LJMP 0000 che riporta il monitor al suo stato iniziale Pagina 23 Cabese o bu Nome Single step by int 0 Single step by int 1 View Edit internal RAM lt Alt D Registers Pagina 24 Find Tasti lt Alt 0 gt lt Alt 1 gt lt Alt E gt lt Alt F gt grifo _ ITALIAN TECHNOLOGY Funzione Questo comando viene usato per debuggare 1 sotto programmi istruzione per istruzione Bisogna ricordare che per generare l interrupt interno viene usato il pin P3 2 INTO quindi non sar disponibile per il programma In questa modalit
76. li riporta su P1 e attente 1 ms dopodich scrivesul port il negato del valore ricevuto dalla porta seriale L overflow del Timer Counter TO genera un interrupt il quale attiva una routine che invua il byte 01H sulla porta seriale La struttura della RAM interna dell MPS 051 identica alla struttura della memoria programma dei processori AT89C2051 1051 a parte il fatto che inizia dall indirizzo 1000H Tale differenza pu essere aggirata cos ADR EQU 1000h linea per debugging SADR EQU 0000h linea 1B programmare il processore BOC EQU 002Bh BEGIN OF CODE indirizzo partenza programma del processore AT89C2051 1051 questo indirizzo deve essere pari o superiore a 002Bh questa parte include le definizioni di variabili e costanti 101710 del codice tutte le direttive ORG vanno scritte nella forma ADR form org ADR BOC org ADR 0000h indirizzo inizio programma dopo reset lmp START salta ad inizio programma org ADR 0003h inizio vettore di interrupt da INTO org ADR 000Bh inizio vettore di interrupt da TO org ADR 0013h inizio vettore di interrupt da INTI org ADR 001Bh inizio vettore di interrupt da TO org ADR 0023h inizio vettore di interrupt da porta seriale START prima istruzione del programma END fine programma La compilazione del programma da debuggare con MPS 051 deve essere condizionata come descritto nella nota di linea 1A cio il codice compilato per inizare dall indirizzo 1000H come richiest
77. lo per la CPU della scheda target in modo che il pin numero 10 GND sia il primo ad entrare in contatto con lo zoccolo target In alternativa collegate prima l MPS 051 alla scheda target e solo in seguito collegatelo al PC l interfaccia RS 232 piu robusta dei port del processore Una connessione errata puo provocare danni al processore contenuto nell MPS 051 a causa di correnti di equalizzazione Come seconda cosa bisogna selezionare il metodo per alimentare l MPS 051 o da scheda target o dall alimentatore fornito in dotazione Il jumper JP4 ha lo scopo di escludere I MPS 051 dai pin di alimentazione sul socket del simulatore Bisogna aprire il jumper JP4 se l alimentazione sulla scheda target superai5V Sipu comunque alimentare l MPS 051 da alimentatore in dotazione la scheda target da una diversa fonte separatamente mantenendo JP4 connesso a patto che la condizione sopra indicata sia strettamente rispettata Per localizzare facilmente 1 jumper JP4 fate riferimento alla figura 5 Dopo avere connesso MPS 051 e scheda target possibile alimentare 1 dispositivi Se state usando l alimentatore esterno in dotazione collegatene la spina per la rete in una presa di rete e 11 connettore coassiale all MPS 051 Il led verde dell MPS 051 si deve accendere Se preferite alimentare dalla scheda target allora alimentate la scheda target La polarit del connettore esterno di alimentazione mostrata in figura 6 Ora potete lanciare il program
78. ma 52051 Per ulteriori informazioni consultate il capitolo DESCRIZIONE SOFTWARE NOTE Lo switch JP5 preimpostato in fabbrica a seconda della quantit di RAM installata per cui l utente non dovrebbe modificarne la posizione Un cambiamento errato potrebbe danneggiare MPS 051 Il funzionamento interno dell MPS 051 predisposto per accettare un quarzo interno di 11 0592 MHz o un quarzo esterno di una delle frequenze tabulate nel programma di controllo Quando l alimentazione viene data il socket del programmatore si trova in uno stato di attesa erazie ad un circuito di reset ed al programma di controllo nel processore MPS 051 Rel 3 00 Pagina 5 ITALIAN TECHNOLOGY gr ifo JUMPERS L MPS 051 fornito di 5 jumpers per selezionare la sorgente del clock sorgente di alimentazione e la quantita della propria RAM installata Evitate di toccare JP5 poich la quantit di memoria propria dell MPS 051 preimpostata alla fabbricazione e l utente non la pu cambiare JUMPER CONNESSIONE DESCRIPTION posizione 1 2 Usa il segnale XTALI dalla scheda target posizione 2 3 Usa il segnale XTALI interno posizione 1 2 Usa il segnale XTAL2 dalla scheda target posizione 2 3 Usa il segnale XTAL2 interno posizione 1 2 Usa il segnale RESET dalla scheda target posizione 2 3 Usa 1 segnale RESET interno L alimentazione dell MCS 051 presa dalla scheda t
79. mming socket Load the program from disk using File Load or pressing lt F3 gt key to copy unprotected device read it with Programmer Read menu or pressing F7 key Give the PROGRAM command When the programming is over the data can be verified the verification is however possible only if the two LOCK bits are not programmed The programming is indicated by the red LED the programming LED 15 live The control program automatically erases the circuit prior to programming When the red LED BUSY is OFF remove the circuit from the programming socket MPS 051 Rel 3 00 p Page 47 e SOFTWARE DESCRIPTION This chapter contains a complete description of the control software its instllation features and utilization The software provided with the emulator programmer is written for working with SIM 2051 of ELNEC but grifo gives warrants a full compatibility and interchangeability between MPS 051 and SIM 2051 so the very good and efficent program developed by ELNEC can be freely used also with our programmer The executable file of the control program 15 called S2051 EXE and 15 designed to work under DOS It is possible to execute it in a DOS window under WINDOWS 95 98 MINIMAL PC REQUIREMENTS The MPS 051 can be connected to IBM PC compatible MPS 051 software requires an MS PC DOS operating system version 3 2 and above Minimum hardware requirements are as follows PC
80. n external power supply insert the power supply cable to a mains socket and the coaxial connector to the MPS 051 The green LED on the MPS 051 lights up If you prefer supplying from the application switch the application power supply ON The polarity of the external power supply is shown in figure 5 Now you can start the S2051 EXE control program Please refer to the chapter SOFTWARE DESCRIPTION for more information about software management NOTES The 5 switch on the MPS 051 board is factory preset depending the RAM used Therefore the User should not change its setting A change in its configuration may damage the MPS 051 The operation of the MPS 051 is preconditioned by the use of an internal crystal of 11 0592 MHz or an external crystal of permitted frequency in accordance with the table in the control program When the power supply is switched ON the programming socket is in an idle state thanks to the resetting circuit and the control program in the processor MPS 051 Rel 3 00 Page 44 5 ITALIAN TECHNOLOGY _ JUMPERS MPS 051 is provided with 5 jumpers to select the clock source the power supply and the amount of memory Please do not touch JP5 because the amount of memory is a factory preset and the User cannot change it JUMPER CONNECTION DESCRIPTION position 1 2 position 2 3 position 1 2 position 2 3 position
81. non modifica il contenuto della RAM esterna a bordo dell MPS 051 Il comando SINGLE STEP BY INTO INTI viene usato per debuggare un sotto programma istruzione per istruzione single step Prima di eseguire uno di questi comandi a seconda che si stia usando P3 2 INTO o P3 3 per generate interrupts si presuppone che venga disconnesso il pin che verr usato per generare internamente l interrupt I sottomenu PortIn PortOut View Edit internal RAM e Registers si possono usare durante le operazioni single step Ulteriori informazioni sulle operazioni single step si possono trovare nei cataloghi dei processori serie MCS 51 o nella letteratura connessa Il resto di questo manuale presente la descrizione d uso di questa modalit dell MPS 051 Gli esempi contenuti nel disco dell MPS 051 forniscono informazioni importanti sulle modifiche del programma La RAM interna del processore pu essere raggiunta sia in lettura che in scrittura tramite ilcomando View Edit intenal RAM Qualunque tentativo di scrivere nei registri riservati al monitor interno dell MPS 051 viene bloccato Tali registri comprendono il 20H e gli indirizzi dal al 7FH stack Il comando BAUD imposta il valore degli opportuni registri dell MPS 051 per abilitare l uso della porta seriale alla velocit di comunicazione selezionata I data in input output possono essere raggiunti tramite il comando Register Tale comando rende possibile leggere e modificare 1l regisro SBUF
82. ntrollers MP AVR 51 enables also programming serial EEPROM with interface types 24Cxx Microwire 93Cxx and SPI 25Cxx The programmer is equipped by ZIF DIP 40pin socket The quality of programmer is completed by comfortable control program MP PIK Micro Programmer for Microchip PIC MP PIK 1s little and powerful portable programmer for Microchip PIC series microcontrollers MP enables also programming serial EEPROM with interface types 24Cxx Microwire 93Cxx and SPI 25Cxx The programmer is equipped by ZIF DIP 40pin socket The quality of programmer is completed by comfortable control program UEP 48 Universal Eprom Programmer 48 pin devices UEP 48 is universal programmer that supports all kinds of types and silicon technologies of programmable devices Powerful pin driver provides logic level pull up pull down clock ground one VCC supply and two programming supply and certainly read on each of all 48 pins independently This advanced design give it the ability to program almost every programmable device in DIL up to 48 pins without adapter or family specific module SEEP Serial EEproms Programmer SEEP is universal programmer of all types serial EEPROM in 8 pin package SEEP enables programming EEPROM with interface types 24Cxx Microwire 93Cxx and SPI 25Cxx Programmer supports programming LV EEPROM 3 3V The programmer is equiped by ZIF socket The quality of programmer is completed by comfortable con
83. o necessario ricorrere al reset hardware o usare il tasto lt ESC gt per ritornare al menu radice del programma di controllo La stessa cosa si pu fare quando chiaro che il programma in single step non eseguir le istruzioni che ci si aspetta esegua In ogni caso il ritorno al menu radice viene preceduto da identificazione automatica del simulatore per preservare 1 parametri di comunicazione corretti verso l MPS 051 Il programma verifica lo stato corretto dello stack in caso di overflow viene terminato 1l single step mode appare sullo schermo un messaggio di allarme e il sistema si pone in attesa di un reset hardware MPS 051 3 00 Pagina 16 5 ITALIAN TECHNOLOGY _ L applicazione della modalit STEP OVER tasto lt F8 gt soggetta ad alcune restrizioni Essa si basa sull inserzione forzata di un break point dopo l istruzione RET di un particolare sottoprogramma ACALL o LCALL Questo viene gestito da un parte della RAM esterna sull MPS 051 compresa tra gli indirizzi 17F6H 17FFH Il programma di controllo trasferisce le rispettive istruzioni di CALL a questa area e aggiunge un break point specifico che comprendo un salto verso l istruzione successiva alla CALL Il controllo viene rediretto in quest area sovrascrivendo la ACALL LCALL nella RAM esterna dell MPS 051 con una AJMP LJMP Quando sono finite le istruzioni la RAM esterna dell MPS 051 in cor
84. o r7 Date 1l comando di programmazione il LED rosso deve accendersi Al termine della programmazione il LED rosso deve spegnersi 1 dati scritti possono essere verificati a patto che 1 due bit di LOCK non siano stati programmati L MPS 051 cancella automaticamente il circuito prima di programmarlo Rimuovere 1 circuito programmato solo dopo lo spegnimento del LED rosso MPS 051 Rel 3 00 p Pagina 11 iih n DESCRIZIONE SOFTWARE Questo capitolo contiene una descrizione completa del software di controllo di come installarlo e di come utilizzarlo Il software fornito con il simulatore programmatore MPS 051 stato sviluppato originariamente per il simulatore programmatore SIM 2051 dalla ELNEC comunque la grifo assicura una piena compatibilit ed intercambiabilita tra MPS 051 e SIM 2051 In questo modo l ottimo programma di controllo sviluppato dalla ELNEC pu essere liberamente fruito anche con 1l nostro MPS 051 Il file eseguibile del programma di controllo si chiama S2051 EXE ed progettato per funzionare sotto DOS Pu anche essere eseguito in una finestra DOS sotto WINDOWS 95 98 REQUISITI MINIMI DEL PC L MPS 051 pu essere collegato ad un PC IBM compatibile Il software dell MPS 051 richiede un sistema operativo MS PC DOS versione 3 2 o superiore I requisiti minimi dell hardware sono PC XT minimo 512 KBytes di RAM Un floppy drive 3 5 Una porta seriale stand
85. o 28 bytes Se invece si usa l istruzione GOTO l indirizzo 61H quindi puo essere lungo 30 bytes Se definite il vostro stack l indirizzo di ritorno per il monitor viene perso Si consiglia in tal caso di ritornare mediante l istruzione LJMP 0000 alla fine del programma riporter 1 monitor al suo stato iniziale L area RAM usata per memorizzare il programma da debuggare inizia dall indirizzo 1000H L indirizzo 20H della RAM interna essere cambiato Dato che 1l buffer contiene due aree di lavoro dato che la lettura di un file binario da disco non permtette all utente di distinguere tra area del simulatore e area del programmatore viene introdotto un compromesso ogni volta che un file viene caricato con successo il contenuto dell area del programmatore viene copiato nell area del simulatore la dimensione dipende da quale chip viene simulato Questo viene fatto anche se l utente ha cambiato 1 valori nel riquadro ADDRESS nella finestra di Load File La seguente tabella 1 ritardi nell esecuzione degli interrupts dovuti alla diversa modalit di chiamata a secondo della fonte usata I valori di tempo sono riferiti a Fosc 11 0592 MHz FIGURA 8 TABELLA RITARDI IN ESECUZIONE INTERRUPT Pagina 22 MPS 051 Rel 3 00 ITALIAN TECHNOLOGY grito bass COMANDI DEL PROGRAMMA DI CONTROLLO La seguente lista mostra tutti 1 comandi disponibili con il programma di controllo Il nome del
86. o dal simulatore Un programma cosi compilato non pu funzionare nello spazio di indirizzamento degli AT89C205 1 1051 che arriva fino a 07FFH Quindi per scrivere il programma sul dispositivo definitivo bisogna ricompilarlo come da commento della linea 1B ovvero da indirizzo 0000H Pagina 20 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ DEBUGGING DEL PROGRAMMA Compilate il sorgente con la ORG per il simulatore Usate il comando VIEW EDIT BUFFER perrivedere e se ncessario modificare i dati nell area riservata al simulatore Se tutto va bene il programma puo essere iniziato con una GOTO o una CALL all indirizzo opportuno entro il range 1000H 17FFH Il programma di esempio EXAPMLE LI si aspetta un carattere dalla porta seriale Dopodich inizia la sequenza di eventi descritta all inizio del capitolo Alla fine dell esecuzione sul port P1 rimane un valore negato Lo si pu verificare dando il comando INPUT con parametro PI LIMITAZIONI HARDWARE DEL CIRCUITO AT89C2051 Il simulatore emula un processore AT89C2051 12PC Il simulatore non puo funzionare con lo stesso campo di tensioni di alimentazione dei microcontrollori AT89C2051 o 1051 Quando alimentato con il trasformatore in dotazione la scheda target pu funzionare con l alimentazione minima tollerata dagli AT89C2051 1051 2 7 V a patto che non insorgano problemi col fatto che 1 resistori
87. o per l utilizzo degli oscillatori interni Supponendo che il vostro MPS 051 sia configurato per funzionare con un oscillatore esterno si verifica un errore di comunicazione seil valore differisce da 11 0592 MHz eil programma funzione in modo DEMO Usate il comando OSCILLATOR per impostare il valore corretto dell oscillatore esterno impiegato Fatto questo 1l programma trova l MPS 051 NOTE SULLA SIMULAZIONE Il programma di controllo pu anche essere usato in modalit BATCH passando il nome del file per il simulatore in linea di comando In tal caso il programma carica il contenuto del file nel formato binario o Intel HEX nella RAM esterna dell MPS 051 lo esegue e restituisce il controllo al sistema operativo L operazione equivalente ad eseguire 11 comando GOTO con l indirizzo 1000H come parametro Il nome del file passato deve essere completo del path Il formato del file viene dedotto dall estensione se questa HEX il file viene considerato un Intel HEX altrimenti viene considerato in formato binario Viene dato per scontato l utilizzo di un AT89C2051 con oscillatore interno ON LINE HELP La descrizione individuale dei comandi del programma di cotrollo pu essere visualizzata selezionando l HELP tasto lt F1 gt Premendo F1 due volte si ottengono tutte le voci dell Help comprese quelle sull HW di MPS 051 MPS 051 Rel 3 00 p Pagina 15 e OPERAZIONI IN SINGLE STEP La modalit
88. of simulator and SIMULATOR FIND command forcommunicationrestoration or usecommand SIMULATOR RESET RESET don t change data in external RAM Specified address must be in range 1000H 17FFH for AT89C205 device respectively 1000H 13FFH for AT89C1051 device Note User have free 30B from stack If ourselves define new stack return address will be lost For successfull return we can reference to use instruction LJMP 0000 on the end of routine whitch restore monitor into original condition Page 59 Cra E Name Shortcut Single Step by int 0 lt AIt 0 gt Single Step by int 1 lt Alt 1 gt View Edit internal RAM lt Alt I gt grifo _ ITALIAN TECHNOLOGY Function This command 15 used for debugging application sub program and allows run this program statement by statement Before every execution of this command 15 necessary to remember that for generates interrupt will be used pin P3 2 INTO hence in application program will not be apply it will apply for internal generating of interrupt In step mode 15 possible to change actual contents of ports PI and P3 bits P3 2 and P3 6 are masked view and edit internal RAM and some of registers More information about single step mode are in data book for microcontrollers MCS 51 In examples on distribution floppy disk are informations about adjustments of program for single step mode Restrictions and recommendations for single step are in STEP MODE
89. ort Un vantaggio importante consiste nel poter eseguire a passi di singolte istruzioni il programma sotto debugging e di poter modificare il contenuto della RAM interna dei registri del processore Il monitor non usa interrupts di conseguenza sono tutti a disposizione dell Utente sebbene siano rallentati dall istruzione LJMP verso l area di RAM esterna Il simulatore si connette al circuito dell applicazione mediante un flat con uno zoccolo da 20 pin intestato al suo estremo La sezione PROGRAMMAZIONE fornisce tutte le funzioni correlate incluse lettura verifica di cancellazione programmazione della FLASH programmazione del LOCK bit verifica di programmazione e cancellazione del contenuto della FLASH Tutte le funzioni dell MPS 051 sono controllate da un comodo programma simile a quelli usati per programmatori e simulatori Il programma guidato da menu e usa tasti speciali Gestisce anche un buffer interno che permette la modifica dei dati binari Inoltre il buffer puo essere caricato o salvato in differenti formati compreso quello sorgente MCS51 MPS 051 Rel 3 00 p Pagina 3 hi grifo ITALIAN TECHNOLOGY CARATTERISTICI TECNICI CARATTERISTICHE GENERALI Microcontrollori simulati Microcontrollori programmati Cavo seriale CARATTERISTICHE FISICHE Dimensioni Massa Campo temperatura Socket ZIF Socket di emulazione CARATTERISTICHE ELETTRICHE
90. program if the INTO is used to generate a debugging interrupt if the debugging interrupt is generated by the INT1 you are not allowed to use the clr EX1 instruction You are not allowed to change the priority of interrupts or more precisely the interrupt used for debugging must maintain the highest priority MPS 051 Rel 3 00 9 h Page 53 e You may not change the interrupt type used for debugging the interrupt type is set in the TCON register 22B of the stack are available for debugging in the single step mode If you define your own stack the return address to the monitor gets lost after completing the SINGLE STEP mode In the STEP state the program indicates this fact and RESETs the simulator automatically In the RUN state it usually remains in an endless loop The debugging interrupt utility routine changes the following addresses in the internal RAM of the processor 20h 59h 5Ah 5Bh 5Ch 5Dh 5Eh When entering BREAK POINTS the debugged program code may not exceed the program memory capacity for the simulated microprocessor type including the limitation concerning the use of the STEP OVER state NOTES It is advantageous to substitute a macro for the instructions of the SW BREAK POINT To avoid various source code modifications for individual debugging techniques you are recommended to use a conditional translation for example with MPS 051 variables to change the initial program add
91. programma infine verifica Analizza il formato del file specificato e lo carica nel buffer del programma di controllo Potete scegliere 1l formato desiderato Binary MOTOROLA MOS Technology ASCII space Tektronix ed Intel Extended HEX Salva il buffer del programma di controllo anche dopo che e stato modificato dall utente in un file specificato Potete scegliere ilformato desiderato Binary MOTOROLA MOS Technology ASCII space Tektronix ed Intel Extended HEX lt Ctrl F4 gt Questo comando permette di vedere il buffer come istruzioni MCS 51 Usate 1 tasti freccia per vedere 1 dati nel campo di indirizzi 1000H 13FFH o 17FFH a seconda del dispositivo emulato Appena attivato il comando mosta 1 dati a partire dall indirizzo 0000H MPS 051 3 00 ITALIAN TECHNOLOGY Nome Tasti View Edit lt F4 gt Fill block Copy block Move block Swap block grito cease e uj Funzione Questo comando visualizza modo view o modifica modo edit 1dati nel buffer del programmadi controllo per visualizzare nel solo modo DUMP Usate 1 tasti cursore per selezionare l oggetto da modificare Idati modificati vengono mostrati con un colore diverso Usate questo comando per riempire il blocco selezionato del buffer del programma di controllo con il valore esadecimale o ASCII richiesto Potete impstare il punto d inizio e quello di fine del blocco Questo comando permette di copiare blocchi di
92. ress and SSTEP to separate S W BREAK POINTS Examples demonstrating the capabilities of the single step mode can be found in the EXAMPLES catalogue on the diskette PROGRAMMER The Programmer part contains all commands required for work with the FLASH EPROM of the A T89C1051 or the AT89C2051 microcontroller Page 54 The SELECT command 15 used to select a circuit type The AT89C2051 type 15 preset The BLANK CHECK command checks whether the programming socket circuit 1s erased The READ command reads the circuit in programming socket and saves the data 1n the control program buffer within the address range of OH 7FFH 1 e in the working area of the buffer reserved for the Programmer part The VERIFY command checks the circuit for correct programming The PROGRAM command programs the data from the control program buffer to the programming socket microcontroller within the address range of OH 7FFH or 3FFH In addition this command allows for programming LOCK bits in the programmed circuit The 2051 control program automatically erases the circuit prior to programming The red LED on the simulator indicates the programming socket activity 111 IMPORTANT Individual P1 and P3 port terminals are common to the simulation socket and the programming socket Therefore signals from the simulated device are not allowed to affect the operation of the programmed circuit The best solutionis to disconnect the simulation cable on the
93. rispondenza della ACALL LCALL viene riportata alle sue condizioni iniziali in modo da poter chiamare il sottoprogramma ad esempio in un loop La modalit STEP OVER pu essere usata solo se il programma da debuggare non supera l indirizzo 17F5H altrimenti la pressione di lt F8 gt provocher la sovrascrittura del programma utente agli indirizzi sopra menzionati Non viene fatto alcun controllo di questa eventualit NOTA DI UTILIZZO DELLO STEP OVER Puo capitare che il sottoprogramma chiamato da ACALL LCALL contenga un break point utente Il programma lo accetta e si ferma Se in questo momento usate il comando RUN lt AIt U gt potete ritornare in maniera sicura dal sottoprogramma passando attraverso l esecuzione del break point forzato nell area riservata della RAM esterna dell MPS 051 comando RUN pu essere rimpiazzato dal single step lt F7 gt 51 dovrebbe notare comunque che dopo aver lasciato il sottoprogramma invocato con ACALL LCALL ci si trovera nell area riservata al momento dell esecuzione del break point forzato Solo dopo il suo completamento 11 controllo ritorna all istruzione seguente la ACALL LCALL INSTALLAZIONE DI BREAK POINT NEL PROGRAMMA DEBUGGATO Sequenza del BREAK POINT per interrupt INTO clr P3 2 setb nop Sequenza del BREAK POINT per interrupt INTI clr P3 3 setb EX nop LIMITAZIONI DEL PROGRAMMA IN SINGLE STEP Il pin P3 2 per INTO o il pin P3 3 per INT1 puo esser
94. rollo dell MPS 051 A seconda di quale pin avete deciso di disconnettere P3 2 per INTO o P3 3 per INT1 selezionate 1 rispettivo comando dal menu SIMULATOR SINGLE STEP BY INTO o SIMULATOR SINGLE STEP BY INTI Si fa notare che a tale pin non si deve fare riferimento all interno del programma debuggato Ci si aspetta che l utente osservi con attenzione tutte le limitazioni e le raccomandazioni date sopra riguardo all installazione di BREAK POINTS nel programma debuggato per non rischiare una errata esecuzione del comando RUN La finerstra di lavoro in modalit single step consiste di varie parti diverse La parte superiore mostra i valori attuali dei registri del processore e dei port P1 e P3 Questi valori vengono aggiornati continuamente da letture fatte sul simulatore Qualunque cambiamento dei registri o dei port dovuto all esecuzione di una istruzione o ad un intervento esterno viene indicato con un diverso colore La linea inferiore contiene la lista dei comandi utilizzabili in questa modalit La linea corrente col cusrsore al suo estremo contiene sempre la prossima istruzione che verr eseguita premendo il tasto ENTER o F7 Inoltre in questa modalit possiblile modificare il contenuta della RAM interna e il contenuto di alcuni registri o ports Premete F1 se volete ulteriori informazioni Quando usate il comando RUN tasti lt ALT U gt il programma debuggato pu perdere la via Solitamente in questo cas
95. ructions in cases when it is clear that the program cannot do what it is expected to Anyway the return to the ROOT menu is preceded by automatic simulator identification to preserve correct setting of communication with MPS 051 The program checks the stack for its currect state If the stack 15 overflown the single step mode 15 terminated an alarm mesage appears on the display and the system waits for the HW reset Page 52 MPS 051 Rel 3 00 5 ITALIAN TECHNOLOGY _ The application of the STEP OVER mode lt F8 gt key has some restrictions It is based on the idea of forced insertion of a breakpoint after the RET instruction in the particular subprogram ACALL or LCALL This is enabled by a part of the external RAM in the simulator within the address range of 17F6H 17FFH The control program transfers the respective CALL instruction code to this area and adds a break point instruction in a specified syntax including a jump back to the next instruction The control is redirected to this area by rewriting the ACALL LCALL instruction code in the external RAM to AJMP LJMP When these steps are over the external RAM in the place of the ACALL LCALL instruction resumes its original state so that it may be called for instance in a loop in this mode The STEP OVER mode can be only used if the debugged program does not exceed the 17F5H address Otherwise the sel
96. s ATMEL from AT89C1051 to AT89C4051 The SIMULATOR part features all the essential functions for efficently debugging the application programs like GOTO CALL SINGLE STEP and STEP OVER execution Via dell Artigiano 8 6 5 40016 San Giorgio di Piano g fo Bologna ITALY ITALIAN TECHNOLOGY E mail grifo grifo it http www grifo it http www grifo com Tel 39 051 892 052 a r FAX 39 051 893 661 MPS 051 Edition 3 00 Rel 20 November 2000 GPC grifo are trade marks of grifo DOCUMENTATION COPYRIGHT BY grifo ALL RIGHTS RESERVED No part of this document may be reproduced transmitted transcribed stored in a retrieval system or translated into any language or computer language in any form or by any means either electronic mechanical magnetic optical chemical manual or otherwise without the prior written consent of grifo IMPORTANT Although all the information contained herein have been carefully verified grifo assumes no responsability for errors that might appear in this document or for damage to things or persons resulting from technical errors omission and improper use of this manual and of the related software and hardware grifo reserves the right to change the contents and form of this document as well as the features and specification of its products at any time without prior notice to obtain always the best product For specific informations on the components mounted on the
97. t If this command 15 selected the content of the buffer will be Checksum MPS 051 Rel 3 00 p filled with topical blank character The checksum is calculated after the entering hexadecimal buffer addresses by next way BYTE sum by bytes to word CY flag is ignored WORD sum by words to word CY flag is ignored BYTE CY sum by bytes to word CY flag is added to result WORD CY sum by words to word CY flag is added to result Column marked as NEG is a negation of checksum so that SUM NEG FFFFH Column marked as SUPPL is complement of checksum so that SUM SUPPL 0 carry Page 63 Cra E Name Shortcut OPTIONS MENU Buffer name Monitor Sound All HEX loadings Page 64 grifo __ ITALIAN TECHNOLOGY Function This option is used to enter full pathname of buffer in case it should be created on disk buffer on disk 15 created automatically if the size of selected device is larger than free memory space It performs no error checking If You enter incorrect buffer name the problem will be raised ahen creating the file on disk This setting is saved to file SO51 CFG by command Options Save options Default name is S051 0 This command sets the colors for used type of VGA display monochrome or color The colors change 15 visible immediately Don t use the command for HERCULES card This card is identified automati
98. the AT89C2051 1 6V Maximum current to L for the SIM2051 is 1 6 mA 0 45V only As opposed to the AT89C205 1 the simulator is not provided with any analog comparator To ensure correct communication between the MPS 051 and the PC through a serial port the external crystal value must correspond with that given in the SIMULATOR OSCILLATOR EXTERNAL menu To make up for the lack of the analog comparator it is possible to use another hardware emulator for family MCS 51 devices T EMUS2 and an adaptor with the following features Adaptor for T EMUS2 and others MCS51 emulators 87C51 AT89C2051 converter Converts pins of AT89C205 1 4051 to 87C51 Includes analog comparator Availability of disconnecting P1 0 20 P1 0 40 and 1 1 20 1 1 40 Page 57 e SOFTWARE LIMITATIONS The monitor stack starts at the 5Fh address of the external RAM of the simulator processor For the process of debugging by means of the CALL function it is available from the address 63H on 1 its length 15 28 bytes In the case of the GOTO function it is the 61H address 1 e 30 bytes If you define a stack of your own the monitor return address gets lost Itis recommended to return by means of the LJMP 0000 instruction at the end of your routine This instruction will return the monitor to its initial state The RAM area which can be used for storing a debugged program starts at the 1000h address The 20H address byte
99. the display Before select this command be sure that simulation socket is disconnect from developed equipment This command programs the device in the socket of programmer with data from buffer in addresses range 0 3FFH respectively 0 7FFH by type of selected device You can program all FLASH EPROM with one or both LOCK bits with the following meaning LB2 0 0 FLASH EPROM not protected 1 0 FLASH EPROM protected against programming 1 1 FLASH EPROM protected against programming and reading Before select this command be sure that simulation socket is disconnect from developed equipment The first the control program checks identification code of device and then erases all device Programmend data are verifying after the programming Analysis file format and loads the data from specified file to the buffer You can choose the format desired Binary MOTOROLA MOS Technology ASCII space Tektronix and Intel Extended HEX The control program stores a last valid mask for file listing You can save the mask into the config file by command Options Save options Saves data in the buffer which has been created modified or read from a device into a specified file You can choose the format desired Binary MOTOROLA MOS Technology Tektronix and Intel Extended HEX lt Ctrl F4 gt This command is used to view data from buffer in MCS51 instruction format Use arrow keys for displaying data in range of address 1000H 13FFH
100. tive command from the control program menu SIMULATOR SINGLE STEP BY INTO or SIMULATOR SINGLE STEP BY INTI It should be noted that the pin will not be accessed in the user s debugged program The user 1s expected to carefully observe all above given limitations and recommendations concerning the installation of BREAK POINTS into the debugged program this being a precondition of correct RUN command execution The working window of the single step mode consists of several parts The upper part displays current values of the processor registers and the P1 and P3 ports These values are continuously updated by reading from the simulator Any changes in the register or the port by stepping an instruction or by external intervention are indicated by different colours The bottom line contains a list of commands used for this mode The current line with the cursor atits end always contains atranslated instruction to be executed in the next step by operating the ENTER or the F7 key In addition this mode makes it possible to scan and modify the internal RAM content and the content of some of the registers or ports Depress the F1 key to obtain Help for further details When you use the RUN command lt Alt U gt the debugged program may lose its way Usually itis necessary to have recourse to the HW reset or to use the lt ESC gt key to return the control program to the ROOT menu The same applies to stepping by individual inst
101. tori interni esterni Dopo avere selezionato con Enter una delle voci disponibili viene rifatto il collegamento con il MPS 051 alla nuova velocit di comunicazione che dipende dalla frequenza del quarzo selezionato Questo comando abilita o disabilita 11 caricamento del file debuggato se viene modificato prima dell esecuzione di qualunque comando di simulazione Simulator Call Simulator Goto Simulator Single step by INTO Simulator Single step by INT1 Abilita anche il caricamento automatico del file all avvio del programma di controllo dopo l elaborazione del file S2051 SET I nomi dei file e l abilitazione del caricamento automatico vengono memorizzati nel file S2051 SET mediante il comando Quit Yes amp Save Usate questo comando per selezionare quale dispositivo va programmato nello zoccolo del programmatore tra AT89C405 1 AT89C2051 o AT89C1051 Prima di attivare questo comando assicuratevi che lo zoccolo del simulatore sia scollegato da qualunque dispositivo Questo comando serve per determinare se il dispositivo nello zoccolo del programmatore stato cancellato Se non stato cancellato il programma di controllo manda una segnalazione acustica e scrive un avviso sullo schermo Primadi attivare questo comando assicuratevi che lo zoccolo del simulatore sia scollegato da qualunque dispositivo Questo comando legge 1 dati dal dispositivo che si trova nello zoccolo del programmatore e li deposita nel buffer del programma di
102. trol program SEEP is computer peripheral it is connecting to PC via standard parallel port ER 05 Eprom Eraser 05 Erases all UV erasable EPROMs holds up to 5 EPROMs programmable timer with three different exposure durations saves UV lamp lifetime provided with power supply MPS 051 Rel 3 00 _ Page 69 grifo ALPHABETICAL INDEX A ACALL 53 AT89C2051 39 40 B BREAK POINT 53 BUFFER 38 C CALL 50 57 58 COMMUNICATION ERRORS 68 COMMUNICATION RATE 40 CONNECTABILITY 40 CONNECTION CABLE 42 CONTROL PROGRAM COMMANDS 59 CONVENTIONS 38 CURRENT CONSUMPTION 40 D DEBUGGED PROGRAM LIMITATIONS 53 DEBUGGING 57 DELIVERY CONTENT 42 DIMENSIONS 40 DISK CONTENT 48 E ELECTRIC FEATURES 40 ELNEC 48 ESD 42 EXAMPLE 56 G GENERAL FEATURES 39 40 GOTO 50 57 58 H HARDWARE LIMITATIONS 57 HELP 51 66 HEX 38 Page 70 ITALIAN TECHNOLOGY MPS 051 Rel 3 00 ITALIAN TECHNOLOGY T grifo I INSTALLATION 42 J JUMPERS 44 45 L LCALL 53 LEDS 45 LJMP 39 58 M MASS 40 MICROCONTROLLERS PROGRAMMED 40 MICROCONTROLLERS SIMULATED 40 N NOTE ON SIMULATION MODE 51 NOTE ON USING THE STEP OVER 53 O OSCILLATOR 51 OSCILLATOR FREQUENCY 40 P PC REQUIREMENTS 48 PHYSICAL FEATURES 40 POWER SUPPLY 40 44 PRELIMINARY INFORMATION 38 PROCESSOR REGISTERS 50 PROGRAMMER 39 54 Q QUICKSTART 4
103. u Simulator Find Le tecniche di debugging vengono spiegate nel capitolo DESCRIZIONE SOFTWARE Programmazione MPS 051 Rel 3 00 p Se 1 pin dello zoccolo di simulazione vengono usati come input rimuovete 11 socket di simulazione dalla scheda target n la scheda target n l MPS 051 possono essere alimentati durante tale operazione Collegate l alimentatore fornito al connettore coassiale dell MPS 051 e alimentatelo Avviate il programma di controllo se necessario usate 11 menu Simulator Find Inserite l integrato da programmare nel socket di programmazione con l orientamente indicato dalla serigrafia accanto al socket stesso Caricate da disco il programma da scrivere usando il menu File Load o premendo F3 o per copiare un dispositivo non protetto leggetelo con il menu Programmer Read o premendo F7 Date il comando di programmazione il LED rosso deve accendersi Al termine della programmazione il LED rosso deve spegnersi 1 dati scritti possono essere verificati a patto che i due bit di LOCK non siano stati programmati L MPS 051 cancella automaticamente il circuito prima di programmarlo Rimuovere 1 circuito programmato solo dopo lo spegnimento del LED rosso Pagina 19 e ESEMPIO OPERATIVO La cartella EXAMPLE sul dischetto contiene due esempi Ne useremo uno EXAMPLEI ASM dimostrare il funzionamento di MPS 051 Il programma debuggato legge 1 dati dalla porta seriale
104. ultare il capitolo SOLUZIONE DEI PROBLEMI se risontrate degli inconvenienti SIMULAZIONE Spegnete il PC l MPS 051 e la scheda target Usate 1 jumper per scegliere se usare l oscillatore il segnale di RESET l alimentazione da scheda target o da fonti interne dell MPS 051 Inserite 1l socket di simulazione nel socket della scheda target dedicato alla CPU AT89C205 1 AT89C1051 L orientamento indicato sull adesivo attaccato al socket Collegate l MPS 051 al e Alimentate la scheda target e se necessario anche l MPS 051 Alimentate il Avviate il programma di controllo se necessario usate 11 menu Simulator Find Le tecniche di debugging vengono spiegate nel capitolo DESCRIZIONE SOFTWARE PROGRAMMAZIONE Se 1 pin dello zoccolo di simulazione vengono usati come input rimuovete 1l socket di simulazione dalla scheda target la scheda target n l MPS 051 possono essere alimentati durante tale operazione Collegate l alimentatore fornito al connettore coassiale dell MPS 051 e alimentatelo Avviate il programma di controllo se necessario usate 1 menu Simulator Find Inserite l integrato da programmare socket di programmazione con l orientamente indicato dalla serigrafia accanto al socket stesso Caricate da disco il programma scrivere usando il menu File Load premendo lt F3 gt 0 copiare un dispositivo non protetto leggetelo con il menu Programmer Read o premend
105. upply to the coaxial connector of the MPS 051 the power supply must correspond to the values given in the Specifications Start the control program or use the Simulator Find command Insert the programmed circuit into the programming socket its orientation 1s indicated by a notch in the programming socket Give the PROGRAM command When the programming is over the data can be verified the verification 1s however possible only if the two LOCK bits are not programmed The programming is indicated by the red LED the programming LED is live The control program automatically erases the circuit prior to programming When the red LED BUSY is OFF remove the circuit from the programming socket Page 55 e muc OPERATION EXAMPLE The EXAMPLES folder on the diskette contains two examples We shall use one of them EXAMPLE1 ASM to demonstrate MPS 051 operation The debugged program reads the serial port data rewrites it to the 1 port and waits 1 ms Then the port is rewritten by a negated data which is sent to the serial port The overflowing of the TIMER COUNTER results in an interrupt and the utility routine of the interrupt sends the 01H byte to the serial port The RAM memory structure in the MPS 051 is identical with the structure of the AT89C205 1 1051 processor program memory however it starts with the 1000H address The difference must be eliminated as follows ADR EQU 1000h lne 1A for debu
106. utente altrimenti verr visualizzato un messaggio di errore indicante le possibili cause dell errore Dopo avere rimosso una delle possibili cause premete un tasto se fallisce di nuovo nel trovare l MPS 051 il programma entra in modalit DEMO ovvero sono bloccati tutti i comandi di controllo nei menu Simulator e Programmer Se riuscite a rimuovere la causa dell errore potete dare il comando Find menu Programmer forzare una ricerca dell MPS 051 su tutte le porte seriali Una volta trovato l MPS 051 puo essere usato come programmatore o come simulatore AVVIO DEL PROGRAMMA CON PARAMETRI Una volta avviato il programma cerca automaticamente l MPS 051 su tutte le porte seriali ma questa procedura puo essere prevenuta inserendo un parametro in linea di comando che specifica l indirizzo della porta a cui collegato l MPS 051 Il parametro nella forma Ayyy ove yyy l indirizzo della COM in esadecimale Se il parametro compare pi volte ogni volta con un indirizzo diverso il programma ottiene una lista di COMs dove cercare l MPS 051 La lista pu essere inserita anche col menu Simulator Find durante l esecuzione del programma Inoltre il parametro si pu usare quando il programma chiamato in un file BATCH Ad esempio una invocazione pu essere 52051 A3F8 A2F8 MPS 051 Rel 3 00 p Pagina 13 grifo __ ITALIAN TECHNOLOGY SIMULATORE Il contenuto della RAM nell MPS 05
Download Pdf Manuals
Related Search
Related Contents
Herunterladen - Konica Minolta IntesisBox - Intesis Software, S.L. JET 577172 Use and Care Manual The Proteus software for computational protein design Fujitsu ScanSnap iX500 Deluxe Amigo Classic Owner`s Manual Equipment performance specifications and test procedures Copyright © All rights reserved.
Failed to retrieve file