Home

DIDACTIC MICROCOMPUTER ZD537 Instruction for laboratory

image

Contents

1. 1 1 1894S 8E 0 61 6Z Z1 Z200Z 2180 HAE tel c A8qunN 1UuaunJof Loza 24 EMEA si4ed e41x3 ZEGQZ 31LIL I s w Do x 420g 0 I paeoqhsy sided I euJ ix vecqz 4 mi La 8 y 4O DAULOD ZEZSY Zdf 2E902 gt LA EQ Load Od H8I OL AOYDSUUOD ZEZSY ZEGOZ gs 9 _ Ga A U UNS UNS 4O12 I S YDIIMS JOIS BOIS 04909435 21 T AT T ANW ia m s gia 4 Se a E sa 4 p a Ma sa da AT va W b al 1 xx I za 4 a aazzna 4 ATddns UAMOd 04008 HALXI Ze602 ZD537 Didactic Microcomputer References 1 2 6 Janusz Janiczek Andrzej Stepien Systemy Mikroprocesorowe Mikrokontrolery Wydawnictwo Centrum Kszta cenia Praktycznego Wroc aw 1997 Janusz Janiczek Andrzej St pie Systemy Mikroprocesorowe Mikrokontroler 80 C 51 52 Wydawnictwo Elektronicznych Zak ad w Naukowych Wroc aw 1995 Andrzej Rydzewski Mikrokomputery Jednouk adowe Rodziny MCS 51 Wydawnictwo Naukowo Techniczne Warszawa 1995 Jacek Majewski Krzysztof Kardach Programowanie Mikrokontroler w z Serii 8x5 1 w J zyku C ksi ka z p yt CD Oficyna Wydawnicza Politechniki Wroc awskiej Wroc aw 2002 Piotr Ga ka Pawe Ga ka Podstawy Programowan
2. MONITOR variables MONITOR program I O PORTS in XRAM RTC FFOXH and LCD FF2XH registers bit ADDRES 0000H 8000H LED keyb interrupt ADDR DF00H E000H LED BUT buzzer LED BUT LED BUT LED BUT piezzo P3 0BOH FFOOH JP9 JP10 connector extra leds keyb out P4 keyb out keyb out Buzzer RS485 Relay 1kHz direction Tx1 RS485 RS485 RED led LCD FF2EH LCD Status FF2CH LCD Control FF2FH LCD Data READ VU input port 555out pulse generator FF2DH LCD Data WRITE external LED BUT LED diode and button memory keyb keyboard bus RTC byte adresable FFOOH units of seconds FFO1H decimals of seconds Fig 1 Map of ports and addresses of ZD537 7 XRAM and CODE memories Memory map is available at Fig 1 e User program is set in CODE memory at address 0000h RAM memory U4 e User variables in XRAM have to be located at 8000h larger data ought to be allocated just after user program e MONITOR program uses XRAM from DF00h RAM memory U4 e MONITOR program code is allocated in CODE memory at E000h ROM memory U3 e I O ports are available in XRAM from FFOOh 16 RTC registers are available at FFOOh data are in BCD code as 4 bit digits FFOOh units of seconds FFO1h tens of seconds etc 11 LCD display registers at FF2xh 10 If user program is generated and set to ROM memory all XRAM 64kB is avail
3. 5 SINCLUDE reg517 inc 6 LIST 7 8 PUBLIC putcharLCD putstrLCD initLCD putctr1lLCD S r LCD Fegisters CSS AS SSA 0 LCDstatus equ OFF2EH 1 LCDcontrol equ OFF2CH 2 LCDdataWR equ OFF2DH 3 LCDdataRD equ OFF2FH 4 5 LCD control bytes rere nen ener nn nn eee eee 6 define HOME 0x80 put curcor to second line 7 define INITDISP 0x38 LCD init 8 bit mode 8 fdefine HOM2 0xc0 put curcor to second line 9 define LCDON 0x0e LCD nn cursor off blinking off 20 define CLEAR 0x01 LCD display clear 21 22 23 LCDpcntr1WR MACRO x 24 LOCAL loop 25 loop 26 MOV DPTR LCDstatus 27 MOVX A DPTR 28 JB ACC 7 loop check if LCD busy 29 30 MOV DPTR LCDcontrol write to LCD control 31 MOV A x 32 MOVX DPTR A 33 ENDM 34 35 LCDcharWR MACRO 36 LOCAL loopl loop2 37 38 PUSH ACC 39 loopl MOV DPTR LCDstatus 40 MOVX A DPTR 41 JB ACC 7 loopl check if LCD busy 42 43 loop2 MOV DPTR LCDdataWR write data to LCD 44 POP ACC 45 MOVX DPTR A 46 ENDM 47 48 init LCD MACRO 49 LCDecntrlWR INITDISP 50 LCDcntrlWR CLEAR 51 LCDecntrlWR LCDON 52 ENDM 53 54 LCD CHAR ROUTINES SEGMENT CODE 55 RSEG LCD CHAR ROUTINES 56 u AI A AR R A a 58 Initialize serial interface 59 initLCD 60 init_LCD 61 RET 02 RRSSESESES SCZ R GEREC S ROREREGEREG RZEGESREGORO C CRERCRERCEEKGEGEGCGZCGCZCZCZ 63 This routine outputs a single character to LCD 64 The character is given in A 65 putcharlLCD 66 LCD
4. 20 21 disp nibble MACRO 22 movx A DPTR 23 anl A 0Fh select 4 bits 24 orl A 30H change to ASCII 25 call putcharLCD 26 ENDM 27 28 EXTRN CODE putcharLCD putstrLCD putctr1lLCD initLCD LCD functions 29 30 31 RTC_PROC SEGMENT CODE 32 RSEG RTC PROC 33 Sd ces SS Se SS SS SS SS sess Set ae Se Se Sea CASE Sse Se EZ Z se S sk SE 35 get time and it dispaly on LCD 36 disp time 37 mov DPTR RTChx get hours from RTC higher nibble 38 disp_nibble 39 mov DPTR RTCxh get hours from RTC lower nibble 40 disp_nibble 41 mov A 42 call putcharLCD 43 mov DPTR RTCmx get minutes from RTC higher nibble 44 disp nibble 45 mov DPTR RTCxm get minutes from RTC lower nibble 46 disp nibble 47 mov A 48 call putcharLCD 49 mov DPTR RTCsSx get seconds from RTC higher nibble 50 disp_nibble 51 mov DPTR RTCxs get seconds from RTC lower nibble 52 disp nibble 53 RET 54 55 56 END END OF RTC 57 this module is not finished lack of set time write date time as string 58 59 A module for RTC clock calendar device It also shows macro definition usage The module is not finished there are no procedures to set time date and to write time date to XDATA or IDATA 18 ZD537 Didactic Microcomputer Appendix 4 Diagrams p 19 assembling diagram p 20 ZD537 main board logic diagram p 21 additional d
5. 8 Oscillator frequency 12MHz 9 initSIOO0 20 MOV TMOD 00100001B C T 0 Mode 2 21 MOV TH1 13 22 MOV TL1 TH1 23 SETB TR1 24 MOV SOCON 01010010B 25 ANL ADCON0 80H 12MHz 9600bps 26 RET 27 define initSIO 0 SOCON 0x52 ADCONO 0x80 TMOD 0x21 TH1 TL1 13 TR1 1 9600 8 n 1 28 H A 30 Initialize serial interface 1 31 Oscillator frequency 12MHz 32 initSIOl 33 MOV S1REL 39 12MHz 9600bps 34 MOV S1CON 0B2H 35 RET 36 37 define initSIO 1 S1CON 0xB2 S1REL 39 9600 8 n 1 38 Y nI amy ee er a ee 40 This routine outputs a single character through SIOO to console 41 The character is given in A 42 putcharSIO0 43 JNB TI 44 CLR TI 45 MOV SOBUF A 46 RET 47 Sl ii ii 49 This routine outputs a single character throught SIO1 to console 50 The character is given in A 51 putcharSIOl 52 PUSH ACC 53 MOV A S1CON 54 JNB ACC 1 putcharSIOl 55 ANL S1CON 0FDH 56 POP ACC 57 MOV S1BUF A 58 RET 59 60 END 61 62 this module is not finished lack of getchar getstring A module to drive serial transmission via SIO0 and SIO1 The module is not finished there are no procedures as getchar putstring getstring etc 15 ZD537 Didactic Microcomputer LCD A51 MopuLE 1 SNOMOD51 2 NAME LCD CHAR LCD display procedures 3 SNOLIST 4 include lt reg517 h gt include CPU definition file for example 80517
6. FFOOH FFO1H FFO2H FFO3H FFO4H FFOSH 59 RTCxs equ 60 RTCsx equ 61 RTCxm equ 62 RTCmx equ 63 RTCxh equ 64 RTChx equ GEO QQ y 66 RICpd equ OFFODH 0x80 0x38 0xc0 0x0e 0x01 B 000000B NOT BUZZ1kHz BUZZ1kHz BUZZ1kHz NOT REDLED REDLED REDLED NOT RELAY P6 RELAY U asembler style macrodefinition C style macrodefinition put curcor to second line LCD init 8 bit mode put curcor to second line LCD nn cursor off blinking off LCD display clear seconds minutes hours 3 4 bits definition of P1 and P3 ports bits can be used by following description P1 0 bit 0 port 1 6 43 no bit entry to P6 port no macros to drive the devices connected to P6 41 42 macro definition written using C standard 44 48 LCD registers placed in specific addresses of XDATA the same solution for RTC registers 14 ZD537 Didactic Microcomputer SIO A51 MopuLE 1 SNOMOD51 2 NAME SIO_CHAR_IO basic procedures for serial comunication on SIOO and SIO1 3 4 SNOLIST 5 tinclude lt reg517 h gt include CPU definition file for example 80517 6 SINCLUDE reg517 inc HL SE LS 8 9 PUBLIC putcharSIO0 putcharSIOl initSIO0 initSIOl 0 1 SIO CHAR ROUTINES SEGMENT CODE 2 RSEG SIO CHAR ROUTINES 3 4 Ds ie ee A A A ee ee a 6 Initialize serial interface 7 Using TIMER 1 to Generate Baud Rates
7. created using uVision environment for example ought to be stored in the same directory as monitor mon51 exe The g go operation starts the loaded program The text PROCESS TERMINATED AT is the result of using RESET key when the program runs The dc display code operation shows in byte mode the actual state of CODE memory the u unassemble operation the same part of memory after disassembling The ready to use test program to verify if parts of microcomputer are OK is described in Appendix 2 ZD537 Didactic Microcomputer G WINNT4System324cmd exe mon51 2 Copyright c 1995 KEIL SOFTWARE INC All rights reserved INSTALLED FOR PC XT AT COM LINE 2 USING HARDWARE INTERRUPT SERVICE xxx MONITOR MODE xxx HAUDRATE 9600 DEFAULT modify fill utility range DEB address gt FILLB range value gt A address assemble gt DC range DEC address gt FILLC range value gt U range disassemble gt DD range gt ED address gt FILLD range value gt X register disp change XDI range gt El address gt FILLI range value gt DX range DEX address gt FILLX range value gt DP range gt EP address gt FILLP range value program execution breakpoint s program load save gt G address breakadd go gt BD bp disable gt LOAD file load hex obj gt T count trace step gt BE bp enable gt SAUE file range save hex gt P count procedure step gt BK bp kill gt LS file load symbols gt BL list gt HELP displ
8. the same connector they allow to observe lines of P1 parallel port from uC 537 The rectangle signal generator NE555 chip is connected to line P1 7 Available frequencies are from 1 Hz to 30 Hz The signal generated by NE555 we can disconnect by taking off J1 strap R16 resistor is a guard of simultaneous generation by NE555 and wC 537 Four lines of P3 parallel port P3 2 P3 3 P3 4 1 P3 5 are supported by LEDs and buttons which can be used for signal generation interrupts generations Others bits of P3 are used as system signals RD WR and to serve serial port signals RxD and TxD This way they are not available for ZD537 user Piezoelectric electro acoustic converter is connected to line P3 2 The device is prepared to generate acoustic signals by user programs 4 Keyboard Matrix keyboard is connected to main board by JP1 connector The keyboard includes 4 rows by 4 buttons Appendix 4 p 21 The keyboard ought to be read by scanning method it is necessary to set lines P5 4 P5 7 of P5 parallel port by logic zero and read bits P7 3 P7 0 If chip U11 is present it is possible to execute keyboard interrupts at line P1 4 auxiliary interrupt of 537 processor When the keyboard is in use SW1 switches have to be OFF ZD537 Didactic Microcomputer 5 Cables for serial port transmission Serial ports signals SIO0 and SIO1 are available at JP2 and DB9 connectors see p 21 The switch at the back side of
9. to SIOO channel Appendix 3 Didactic program This part of the document presents the TEST program for didactic set ZD537 All modules of the example are written in assembler and are prepared based on template a5l program by KEIL see directory keil62 c51 asm template a51 This is strongly recommended style for assembler programs The program modules show how to operate with serial transfer via SIOO and SIO1 channels LCD display and clock calendar module called RTC The presented modules are the basic examples and they are not finished The student task is to use the example to prepare their programs in the same style It is very good idea to create the programs as multi modules structures using segments macros etc The laboratory exercises are not only focused on 51 processors set of instructions but to learn about assembler s pseudo operations Below you can find the modules with comments The comments are related to numbers of rows and are signed by nn where nn is the row number 12 ZD537 Didactic Microcomputer TEST A51 MopuLE 1 SNOMOD51 2 NAME TEST ZD537 ASM tutorial 3 4 NOLIST 5 include lt reg517 h gt C style include definition file for example 80517 6 SINCLUDE reg517 inc asm style include definition file for example 80517 7 SINCLUDE ZD537 inc definition file for ZD537 board 8 SLIST 9 0 EXTRN CODE putcharSIO0 putcharSIO1 initSI00 i
10. DIDACTIC MICROCOMPUTER ZD537 Instruction for laboratory exercises Kazimierz Kapton Jacek Majewski Jarostaw Sugier Part I Hardware description Part II Program description Appendix 1 ZD537 Monitor 2 Test program 3 Didactic program 4 Boards descriptions Institute of Computer Engineering Control and Robotics Wroclaw University of Technology 2003 ZD537 Didactic Microcomputer PARTI HARDWARE DESCRIPTION 1 Short description of ZD537 didactic set ZD537 didactic set is dedicated to laboratory exercises focused on architecture of simple 8 bit microcomputer systems assembler programming of 51 family microcontrollers rules of 51 family microcontrollers using ZD537 set includes e main board with Infineon Siemens 80C537 microcomputer e additional board with LEDs keys buzzers rectangle signal generator power stabilizer e 16 key keyboard e cables to connect ZD537 to PC computer via serial port e power supplier without stabilizing elements 7 9 V Diagrams of main board additional board and keyboard are available in Appendix 4 pp 20 21 Diagrams of boards with connectors are presented at page 19 2 ZD537 main board Main board includes e 80C537 microcomputer uC 80C537 Ul chip is enhanced version of uC 8051 80C537 microcomputer combines 9 parallel I O ports PO P8 2 serial ports SIOO and SIO1 8 bit A D converter timers TO T1 and T2 Full descri
11. E020E9 1000E600E7F990FF2C7480F090FF2EE020E7F9905E 1000F600FF2DE508F090FF2EE020E7F990FF2D7424 1001060020F090FF2EE020E7F990FF01E0540F2445 100116003090FF2DF090FF2EE020E7F990FFO0E0F1 10012600540F243090FF2DF0AF097801EF088001BD 1001360023D8FDF5S09FFF5SE88FF88F90AF08120078 1001460003E50804FF12000BE4F50AF50BB2B2054D 100156000BE50B7002050AE50BB4FFF1E50AB40FD7 07016600ECD2B20200BD2241 10016D008B0C8A0D890EABOCAAODA90E1201B46071 10017D001E90FF2EE020E7F9ABOCO5S0EES0EAA0D43 10018D007002050D14F91201B490FF2DF080D722E5 030000000201A852 0C01A800787FE4F6D8FD75810E02001689 1001B400BB010689828A83E0225002E722BBFE0249 0901C400E32289828A83E493227C 00000001FF 11 ZD537 Didactic Microcomputer Additionally the test program switch on LEDs connected to P1 and P3 ports ring counter driven by zero the buzzer connected to P3 2 generates sound If we push the key connected to P3 2 the sound ends The key connected to P3 3 switched off the buzzer The key connected to P3 4 is responsible for flip flop If SWI is switched OFF we can test the keyboard The key pressing generates the special characters in LCD display and send the characters
12. Start stop debug session Ctrl F5 Caution if you set in project options Load application at startup code of your program is transmitted automatically by serial port and debugger prompts by cursor present at the first line of your program yellow arrow at the left side of the first line of program code If you do not observe the described situation there are errors It is necessary to correct your program before next steps ZD537 Didactic Microcomputer e Step by step execution Debug Go F5 Debug Step F11 Debug Step over F10 Debug Run to cursor line Ctr 1 F10 e Variables watching defined in IRAM by assembler DATA option choose View gt Watch amp call stack window e Memory watching View Memory window e Different parts of memory you can display as follow B 0xXX IRAM memory bit addressing C 0xXXXX CODE memory D 0xXX IRAM memory direct addressing I 0xXX IRAM memory indirect addressing X 0xXXXX XRAM memory 10 Text monitor MON51 EXE MONS1 EXE is a simple text program to monitor the state of 51 sets collaborating with PC computers based on Keil protocol To start it type mon5l exe 2 where parameter 2 defines the number of Com port The end by Fl key The monitor session is presented in Fig 3 A symbol is a prompt The first operation help presents the monitor functions The instruction load tes01 hex loads the ready to use test program The file test01 hex
13. able by scanning method keyboard interruptions available with additional chip U11 8 switch module SW 1 available via P7 parallel port Caution P7 parallel port is also used for keyboard so when keyboard is in use set SW1 switches to OFF Additional elements of main board available via P6 parallel port P6 4 piezoelectricity converter with 1 kHz generator P6 0 red LED D3 P6 6 relay s connectors available at ZS11 ZS12 connectors JP9 JP11 connector auxiliary device driven via P4 parallel port A D converter 8 channels can be driven by SWI connectors OV or 5V continuous changes from OV to 5V is available if potentiometers are connected to JP10 ZD537 Didactic Microcomputer e GAL chips US U6 type 16V8 decoders of memory addresses and devices into XRAM 3 modes of main board settings a MONITOR mode Z7 OFF Z8 OFF upper position of switch MONITOR 537 program working b RAM mode Z7 OFF Z8 ON lower position of switch user program working stored in RAM memory c ROM mode Z7 ON Z8 OFF ON not important program stored in ROM memory working e JP5 JP6 connectors power from additional board supplies main board 3 ZD537 additional board Additional board is connected to auxiliary power supplier without stabilizing elements 7 9 V The board includes stabilizer 7805 1C1 The ZD537 main board is supplied by stabilized power by JP5 amp JP6 connectors 8 LEDs are connected using
14. able for user User s variables can be located at 0000h I O ports are not transferred XRAM banks are switched by P6 7 There is no sense to switch the XRAM banks by MONITOR because MONITOR variables are lost ZD537 Didactic Microcomputer PART II SOFTWARE DESCRIPTION 8 Communication with PC computer Collaboration between ZD537 and PC computer is realised by Keil Software GmbH http www keil com integrated environment uVision or simple text monitor mon51 exe The communication is realised by serial port To start transmission it is necessary to a set DB9 into SIOO switch turned into red or black point b realize RESET in MONITOR mode switch Z8 released MONITOR ZD 537 visible at LCD display Communication is realised by monitor generated using Keil devices and stored in EPROM Appendix 1 14 9 Vision 2 environment uVision software is an Integrated Development Environment IDE which offers all devices necessary during program creation for 51 microcomputer It is possible in one application to edit source code to compile to link to send the ready to use program to ZD537 Then it is possible to start the user program also step tracking you can observe the actual data in registers ports memory etc There is a limit of 2kB of ready to use code of user program INFO ABOUT SOFTWARE uVision software is a very sophisticated product There is help option available Books use Help Open Books Windo
15. ay menu gt BS address set Hload test01 hex gt PROCESSING TERMINATED AT 0000 02 01 A8 30 99 FD C2 99 8F 99 22 E5 9B 30 53 9B FD 8F 9C 22 75 09 20 E4 F5 08 63 90 FS OA FS OB 05 OB ES OB 70 02 05 OA ES OB F3 E5 OA B4 1F EE ES FA 30 E4 OB 53 FA EF LUMP 01A8H JNB TI 99H 0003H CLR TI 99H MOU SBUF 99H R7 RET MOU A 9BH JNB OElH 000BH ANL 9BH OFDH MOU 9CH R7 RET Fig 3 Text monitor mon51 exe at work Appendix 1 Monitor ZD537 The collaboration with PC computer is driven by the monitor the main control program stored in an EPROM memory The program was generated using set of tools prepared by Keil Enterprise for uVision environment available in directory Keil C5 I MONS1 The monitor generation was realised as follow 14 install bat 1 DF EO where parameters 1 DF EO means transfer speed 9600 bps internal baudrate generator and the memory page numbers XDATA and CODE which ought to be used by program see Fig 4 The file mon51 hex was created with additional instructions to show MONITOR ZD537_ message in LCD display and to initialise RED LED P6 0 on and BUZZER P6 4 off 10 ZD537 Didactic Microcomputer Caution SIO0 channel is already used for communication matters of the monitor so there is no chance to observe its state in the user s program It is possible to generate the monitor program using SIO1 channel install bat 3 DF EO and to connect two cables to PC compute
16. charWR 67 RET E A ee oe Pe pia A 69 This routine outputs a control character to LCD 70 The character is given in A 71 putctr1lLCD 72 xch A R2 T3 LCDcntr1lWR R2 74 xch A R2 16 ZD537 Didactic Microcomputer 45 RET MG ZRANIONA RAR O RAPU R R PA A PU PI O ee o o 77 This routine outputs a string to LCD String is terminated by 00H 78 The string in CODE memory is pointed by DPTR 79 putstrLCD 80 CLR A 81 MOVC A A DPTR 82 JZ EXIT check if end of string 83 push DPH 84 push DPL 85 CALL putcharLCD put char to LCD 86 pop DPL 87 pop DPH 88 INC DPTR 89 SUMP putstrLCD 90 EXIT RET 91 92 END 93 this module is not finished lack of polish characters 94 A module for LCD shows macro definition usage The module is not finished Polish characters are not available for example 17 ZD537 Didactic Microcomputer RTC A51 MopuLE 1 SNOMOD51 2 NAME RTC display time minutes amp seconds on LCD 3 4 SNOLIST 5 include lt reg517 h gt include CPU definition file for example 80517 6 SINCLUDE reg517 inc 7 SLIST 8 9 firts two RTC registers 0 RTCxs equ OFFOOH seconds 1 RTCsx equ OFFO1H 2 RTCxm equ OFF02H minutes 3 RTCmx equ OFFO3H 4 RTCxh equ OFFO4H hours 5 RIChx equ OFFO5H 6 7 RTCpd equ OFFODH 8 9 PUBLIC disp time
17. ed knowing of files reg571 h and reg517 inc obligatory 5 6 define files can be prepared as for C and as for assembler style 10 12 definitions of external subprograms in other modules 14 definition of stack segment character can be used in the name 19 20 solid segment the first instruction after RESET operation 22 moveable segment after the interrupt vectors 26 test program text in LCD display loop with A and B characters for SIOO and SIO1 channels time in LCD display 53 text segment organised in CODE part 13 ZD537 Didactic Microcomputer ZD537 INC MopuLE NE555 BIT P BUZZpiezzo BIT P REDLED equ 0 RELAY equ 0 BUZZER OFF MAC END BUZZER ON MAC 0 d Gn Ln WN KA O O OO JOU d W N HH 9 BUZZER TOGGLE MAC 23 REDLED ON MAC 24 AN 25 END 28 REDLED_OFF MAC 32 REDLED TOGGLE MAC 34 END 36 RELAY OFF MAC 37 AN 41 define RELAY ON 42 ORL 44 LCD registers 45 LCDstatus equ 46 LCDcontrol equ 47 LCDdataWR equ 48 LCDdataRD equ 0 0 0 0 ZD537 BOARD macros 6 definitions Ler Say P6 port bit definitions BUZZ1kHz equ 00010000B 000000 RO L P6 M P6 L P6 L P6 RO RO P6 E RO P6 E F2EH F2CH F2DH F2FH 50 LCD control bytes 51 define HOME 52 tdefine INITDISP 53 tdefine HOME2 54 tdefine LCDON 55 define CLEAR 58 firts two RTC registers
18. evices diagrams Power supply 7 5 U m ros BEST ocopocpoo JE eos 2 O GORR g E cr el ESA AB oo Noe Y De E Q ci Z O 5 5 P3 5 m E ICI P O P3 4 N rir3a p3 3 q ac a o P3 2 9 i i a 5 COCA 3 CTC JP1 0 E EA pr N CIOL IPi 2 O EJ Cp 3 O a nr MON RELL Us u2 LP IP1 4 z JO dl NN W m CI _ P1 5 NI P a gt 2 EJ rs TO 0 CJ P1 7 9 8 zg IQ d 3 o TOM 2 WORE D Ge c S 614 p ES aga Q 1 j O ps n ee LIL ARA Se R2 A3 3F R5 C15 BAT1 19 ZD537 Didactic Microcomputer L Am x bn cu I mao gt rze eo C eet rza za Le e REN nna AAC ONY enans ene ETS i a LJ o pa a a III i TE z z T DU U 20 akan wa LEJ mi inn wix WES RTC 22421 ZD537 Didactic Microcomputer
19. ia Mikrokontrolera 8051 Warszawa 1995 Tomasz Starecki Mikrokomputery Jednouk adowe Rodziny 51 Wyd NOZOMI Warszawa 1996 PDF files 7 8 9 10 11 12 13 14 15 16 17 SAB 80C517 80C537 8 Bit CMOS Single Chip Microcontroller User s Manual Siemens Semiconductor Group plik 80517_USERMAN PDF 1M bit CMOS Static RAM MOS Integrated Circuit uPD431000A Data Sheet NEC Corp file RAM_431000 PDF NMOS 512K 64K x 8 UV EPROM M27512 SGS THOMSON Microelectronics file 27512 PDF Dot Matrix Liquid Crystal Display Controller Driver HD44780U Hitachi Ltd file HD44780U PDF Real Time Clock Module RTC 72421 72423 Application Manual SEIKO EPSON Corp file RTC72421_APPMAN PDF Microprocessor Supervisory Circuits MAX691 Maxim Integrated Products file MAX691A MAX800M PDF Precision Single Supply SPST Analog Switches MAX323 Maxim Integrated Products file MAX323 MAX325 PDF Application Note 152 Installing and Using Keil Monitor 51 Keil Elektronik GmbH file MON51 PDF SN65176B SN75176B Differential Bus Transceivers Texas Instruments Inc file 75176 PDF GAL 16V8 High Performance E CMOS PLD Generic Array Logic Lattice Semiconductor Corp file 16V8 PDF 74HC HCT573 Octal D Type Transparent Latch 3 State Philips Semiconductors file 74HC573 PDF 22
20. ject Targets Groups Files label Groups Add files choose Source Group 1 button Add files to group choose your source file COMPILER AND LINKER e Choose Project Build target F7 or Project Rebuild all targets ZD537 Didactic Microcomputer Options for Target Target 1 I 2x Target Output Listing C51 A51 BL51 Locate BL51 Misc Debug C Use Simulator Use keil Monitor 51 Driver y Settings I Load Application at Startup M Go till main Go till main Initialization File Initialization File Browse Browse m Restore Debug Session Settings Restore Debug Session Settings M Breakpoints Y Toolbox T Breakpoints T Toolbox Ie watchpolnts 8 PA T Watchpoints v Memory Display T Memory Display CPU DLL Parameter Driver DLL Parameter 58051 DLL 58051 DLL Dialog DLL Parameter Dialog DLL Parameter o800 0L p517A r500 DLL p517A Cancel Defaults Target Setup E m Comm Port Settings Cache Options Port Com 2 y M Cache DATA SFR Baudrate 8600 y M Cache IDATA M Cache XDATA r Stop Program Execution with M Cache CODE Cancel T Serial Interrupt b Fig 2 Settings of project options e In case of errors or warnings double click at line with error warning description available in panel Bui Id starts edit option of proper source line HOW TO START YOUR PROGRAM e Choose Debug
21. nitSIO1 SIO functions 1 EXTRN CODE putcharLCD putstrLCD putctrl1LCD initLCD LCD functions 2 EXTRN CODE disp_time RTC functions 3 4 STACK SEGMENT IDATA STACK goes into IDATA RAM 5 RSEG STACK switch to STACK segment 6 DS 50 reserve your stack space 7 50 bytes in this example 8 9 CSEG AT 0 absolute Segment at Address 0 20 LJMP start reset location jump to start 21 22 PROG SEGMENT CODE 23 RSEG PROG 24 USING 0 state register_bank used 25 for the following program code 26 Start MOV SP STACK 1 assign stack at beginning 27 28 BUZZER_OFF Buzzer 1kHz off 29 REDLED_ON optional instruction 30 call initLCD 31 mov A fHOME2 32 call putctr1lLCD put LCD cursor to second line 33 MOV DPTR text 34 call putstrLCD display string 35 36 call initSI00 37 call initSIOl 38 39 C01 40 mov A A 41 call putcharSIO0 y S100 YA send charactear 42 mov A B 43 call putcharSIO1 p SiO gt pir send charactear 44 ane PL binary counteron on Pl LEDs 45 cpl BUZZpiezzo make sound on piezzo buzzer 46 mov A HOME display time at fist line on LCD 47 call putctr1lLCD 48 call disp time 49 50 SJMP C01 while 1 51 RET 52 53 CO TEXT SEGMENT CODE 54 RSEG CO TEXT 55 text DB ZD537 test 00 text located in CODE memory 56 57 END END OF main 58 1 standard 51 processor registers are turned off program is for 517 processor 4 listing of file header include is prohibit
22. ption of all modules uC 537 modules can be find in 6 and 7 e ROM memory 27512 chip U3 9 includes main ZD537 MONITOR program prepared using KEIL software see Appendix 1 e RAM memory 431000 chip U4 8 stores user program transmitted by serial port when the power is switched off RAM memory is lifted by lithium battery available at main board ZD537 Didactic Microcomputer Serial ports SIO0 and SIO1 connectors serial ports SIOO and SIO1 of uC 537 are connected to DB9 connector by voltage converter chip MAX 232 U9 13 transmission according to RS232 SIOO SIO1 selection is realised by switch located near DB9 connector SIO1 transmission can be done also according to RS485 It is necessary to set U10 chip 15 and to remove Z10 strap Transmission according to RS485 over 10m lt 1200m requires special terminators RTC Real Time Clock timer calendar chip RTC 72421 U7 11 RTC registers are available in XRAM at FFOxh addresses Fig 1 RTC is lifted by lithium battery Chip MAX691 U8 12 power guard RESET signal generation battery lifting switching SW2 switch system RESET LCD module 2 lines 16 character in each line LCD display fixed to main board and connected by LCD1 connector LCD driver s registers available in XRAM at FF2xh addresses Fig 1 HD44780 chip driver description 10 Matrix 16 key keyboard connected by JP1 connector avail
23. r Com and Com2 This way is possible to trace SIOO channel by SIO1 channel Appendix 2 Test program TEST01 HEX The TESTO1 HEX program is prepared to verify the correct work of all ZD537 parts At the beginning the following text is presented in LCD display p 45 Change SW1 If we change the position of switch SW1 we observe the change of character presented in LCD display p in figure Two digits are the result of RTC and they show time in seconds The code of character set by switch SWI is transmitted by SIOO channel SIO1 channel transmits character code incremented by 1 For example if SIOO channel transmits character A SIO1 channel transmits character B We can test the results by switching SIO channels proper switch at the back side of microcomputer THE FILE TESTO1 HEX 0B019D004368616E6765205357310016 080003003099FDC2998F99228A 0B000B00E59B30E1FB539BFD8F9C2226 10001600750920E4F5086390FFE4F50AF50B050B76 10002600E50B7002050AE50BB4FFF3E50AB41FEE13 10003600E5FA30E40B53FAEFS3FABFS3FAFE8009A0 1000460043FA1043FA4043FA010508E508B406C628 1000560043FA1075985243D880758921758BF375CC 100066008DF3D28E759BB2759DD990FF2EE020E759 10007600F990FF2C7438F090FF2EE020E7F990FFFE 100086002C7401F090FF2EE020E7F990FF2C740EFF 10009600F090FF2EE020E7F990FF2C74C0F07BFF74 1000A6007A01799D12016D90FF017401F090FF00B5 1000B600F075E8FE7509FE30B20543FA0180035378 1000C600FAFE30B30553FAEF800343FA1030B40555 1000D60053FABF800343FA4085DB0890FF2E
24. the ZD537 allows to choose which port SIOO or SIO1 is connected do DB9 and guarantees the communication uC PC Red or black point shows SIOO 6 Map of ZD537 ports Map of ZD537 ports you can see at Fig 1 PO P2 and partially P3 lines P3 6 and P3 7 are the system buses and are not available for users LEDs are connected to P1 Using Jl strap NE555 as rectangle signal generator can be connected to P1 7 If chip U11 is present it is possible to execute keyboard interrupts at line P1 4 LEDs and buttons are connected to P3 5 P3 2 Piezoelectric buzzer is connected to line P3 2 P4 are available for the user at JP9 JP11 connector The older part of P5 is connected to the keyboard The row driving is realised by younger part of P7 All lines of P7 are connected to DIP SWITCH SWI When the keyboard is in use SW1 switches have to be OFF P6 drives red LED D3 line P6 0 at main board relay RELI and PCI buzzer which generates 1 kHz signal P6 6 is responsible for direction of RS485 transmission RS485 lines are combined to SIO1 P6 7 switches the banks of XRAM memory CAUTION P6 P7 and PS are available as bytes only are not available by bits P1 P3 P4 P5 are available as bytes are available by bits also P7 and P8 are read only A D converter ports ZD537 Didactic Microcomputer ZD537 UO PORTS ZD537 XRAM amp CODE MEMORY MAP USER PROGRAM USER XRAM variables ES
25. w The most valuable are the following files e Windows help uVision User s Guide e Getting Started with uVision2 file GS51 PDF e Macro Assembler and Utilities file A51 PDF PDF file are stored in Keil C51 HLP Below you can find the steps of simple program creation ZD537 Didactic Microcomputer NEW PROJECT CREATION 1 Menu Project New project e Project files have extension uv2 e Make project in new folder in the dialog box Create new project you can create new folders e In dialog box Select device for target Target find proper chip Infineon SAB 80C537 2 Options for project Project Options for target Target see Fig 2 e Label Target set frequency Xtal 12 MHz e Label Output check if selected filed Debug information e Label Debug choose Use Keil Monitor 51 Driver and choose Load application at startup Caution it is possible to start program using simulator without ZD537 If you want to make it choose in label Debug Fig 2a Use Simulator e Button Settings Fig 2b Port Com 1 used in PC computer for communication with ZD537 Baudrate 9600 Caution if you use SIOO in your program there are problems with transmission realised by Keil monitor clear in that case all options Cache in settings at Fig 2b 3 Source file creation e Choose File New use extension a51 or asm for assembler files e Add your file to project choose Pro

Download Pdf Manuals

image

Related Search

Related Contents

取り扱い上の注意 取扱説明書  MODEM INTELIGENTE DE ALARMAS  eos 100 handbuch - G  Untitled  Origin Storage Datalocker  NEO 2 Teacher`s Desktop Quick Reference  RCA J26HE840 User's Manual    HEM 710INT SP PT  取扱説明書 - オークセール  

Copyright © All rights reserved.
Failed to retrieve file