Home

user manual

image

Contents

1. Lan 1 A Connection methods direct connection connect 8way2 reverser connection connect P1 indicators JP32 to P1 port JP 44 of CPU byjport JP44 of CPU to the inputs JP29 of the a 8pin cable reverser by a 8pin cable Connect reverse At this point we can see the lights areoutputs JP 34 to 8 way Indicators JP 32 urned off as binary sequence At this point we can see the lights are turned on as binary sequence p WNexperiment 9 74 LS138 part of the 38 decoder part of the experiment The 3 8 decoder is used to control 8 lines through 3 lines In the circuit it plays a role of extending IO resources 74L 5138 Pin definition 4L 5138 Logic table Pin Assignment for DIP SOIC SOP and TSSOP VAIA UUTPUTS I x TI L S e EE E e LL PS PS EL Ge Pe P ror s SE E E Z P FP PP xx ZE E gp E 1 TF x x E Per ZE P Ep ZE Fr X sw i EE dle e E P ale do calo cale cale cale I E E gu E aiu aie GE E AE E 26 I II Z E Z ZI ZI I lb sala SE b le EL de ele wl ve E da Pr E E E E LL E Mm Z Z Z Z Z Z Z Z 741381he circuit schematic c 74LS138
2. b e d DJNZ R4 SBA MOV R4 2 JMP SBC SXB1 MOV R5 5 SXB2 remove 20us disturb signal JNB P3 7 SBB DJNZ R5 SXB2 JMP START SBC MOV R5 250 SB1 JB P3 7 SB2 DJNZ R5 SB1 DJNZ R4 SBC JMP START SB2 remove 20us disturb signal MOV R5 5 SB2 A JNB P3 7 SB1 DJNZ R5 SB2 A MOV R4 3 SB2 1 MOV R5 250 SB3 JNB P3 7 SXC DJNZ R5 SB3 DJNZ R4 SB2 1 MOV R4 2 JMP SB3 1 following recognize the code MOVA 1AH compare high 8bit address XRL A 00000000B JNZ EXIT decode error MOV A 1BH compare low 8bit address XRL A 11111111B retest high 8bit address JNZ EXIT decode error LCALL YS3 MOV A ICH CPLA XRL A 1DH verify data JNZ EXIT decode error LCALL YS3 CLR P2 6 select digital tube CLR P3 3 speaker beep sno high TTL is wrong in 2MS MOV R5 5 SB4 1 JB P3 7 SB3 2 DJNZ R5 SB4_1 MOV R1 1AH MOV R2 4 PP MOV R3 8 JJJJ MOV R5 250 JJJJ2 JB P3 7 JJJJ3 DJNZ R5 JJJJ2 JMP START JJJJ3 LCALL YS1 MOV C P3 7 JNC UUU MOV R5 250 JJJJ4 JNB P3 7 UUU NOP DJNZ R5 JJJJ4 JMP START UUU MOV A R1 RRC A S MOV R1 A DJNZ R3 JJJJ INC R1 DJNZ R2 PP T4 CJNE A 09h T5 MOV PO 61H T5 CJNE A 1dh T6 MOV
3. 39 Experiment 13 A D conversion experiment with ADCOB804 aa aas mee man mes mar mese mee ceee 41 Experiment 14 alarm with small speaker case 00 cee cee ser tee tee tee eee r 49 Experiment 15 infrared remote control experiment cee cee cee cee cee 44 Experiment 16 Chinese characters display case A Experiment 17 8155 experiment SC EE Ge Experiment 18 24C02 store the number of bading NEE e aa 51 Experiment 19 step motor experiment soe ce cee sarre ser cee eee eee cee tee ser eee eae nee eee nee DO Experiment 20 93c46 demonstration program see cee cee cee D Experiment 21 two way serial communication experiment e cette o 96 Experiment 22 digital temperature display system with 18B20 of Experiment 23 hardware counter experiment with NE555 oscillator D Experiment 24 real time clock experiment with DS1302 e D I Experiment 25 PS2 keyboard experiment e DI Experiment 26 SD card SPI mode experiment i 68 Experiment 27 485 communication experiment D I Experiment 28 12864 LCD display Al Chapter VII frequently asked questions and answers Bee Chapter VIII system configuration and post sale service guide 75 User survey card 16 Attention Whether you re a novice or expert m spend at least one hour to read this manual carefully Chapter I XL2000 integrated single chip s
4. Download lt gt Single chip goal RST lt gt RST n MOSI lt gt MOSI MISO lt gt MISO SCK lt gt SCK VCC lt gt VCC GND lt gt GND AT89S51 ATSoS s15 ISPro MOSI P1 5MOSI ISPro MISO P1 amp MISO ISPro SCK P1 7 SCK XTAL2 ISPro RST ATmega123 ATtiny 12 ISPro RESET PBS RESET ISPro SCK TSPro MISO ISPro MOS 1 AT89S8252 has internal data EEPROM can do on line programming 2 Requirement for a simplest target board system Crystal 4MHz above target MCU 5V power supply for the target board and programmer with downloading functionality 3 Better make the functionality of ISP pins of target single ship exclusively when designing the board do not multiplex with other functionality 4 If reset circuit is composed of RC circuit then the RESET pin could be connected directly Kindly reminder the secure capacitance for MCU can not be too high Recommend value maybe 1uF better not exceed 10uF Connecting method for PIC series refer chip manual for PB7 PB3 PBG definitions different PICs may be different E XI2000 development system Shenzhen China Xuelin Electronics Co Ltd E 16 PIC16F87X gt target single chip mum n gt Vpp MCLR gt DATA PB7 I gt PGM PB3 gt CLOCK PB6 gt VCC gt GND gt AT24CXX gt SCK gt VCC gt GND Ispro exe program of writer 10Pindownload cable 51 PICAVR Experimenta
5. XI2000 mcu development system Chapter XL2000 integrated single chip simulation Instrument System 2 Chapter II Quick Start Follow me to make XL2000 Marquee experiment 0 Chapter Ill USB interface installation guide n na aan nue moone man mee moe 10 Chapter IV Using ISP downloading part 00 mure cee mar 13 Chapter V XL2000 simulating operation guide II Chapter VI XL2000 single chip system Experiments cee 21 pins of MCS 51 single chip ssa 29 Experiment 1 simple eight way eg case l Ge Ee EE Experiment 2 8 way controller lantern case with XL2000 einen S 20 Experiment 3 8 way DIP switch state display with 8 indicators s mes ces mese meere 26 Experiment 4 Digital Tube display with static SCANNINQ d Experiment 5 LED number display with dynamic scanning e 28 Experiment 6 key button detecting number show e cece cece eeeeee een een ns 31 Experiment 7 Matrix keypad recognition technology eee ee cee cee cee 92 Experiment 8 74LS14 reverser experiment cece ee ee cee sees cee 194 Experiment 9 74LS138 3 8 decoder experiment cece eee cee cee A Experiment 10 74LS164 serial in parallel out control experiment 96 Experiment 11 74LS165 parallel in serial out control experiment 0 97 Experiment 12 D A conversion experiments with DAC0832
6. Install the soft tomatically R ded DES i S Install the software automatically Recommended Choose this option to select the device driver from a list Windows does not guarantee that Install from a list or specific location Advanced the driver you choose will be the best match for your hardware Click Next to continue Step three Pop up to install hardware dialogiStep four The second pop up system found box If prompts with did not pass thelnew hardware wizard dialog box Repeat the Windows logo testing it does not matter labove steps Pop up dialog box in the bottom Click continue Started to install wizardright corner of the new hardware is installed software Then pop Found New Hardwareland can be used USB drive has been Wizard to complete dialog box Click Finish successfully installed You can enter the system ControlPanel system hardware Devic e Manager in the following port information That the system has been installed in the right USB drive a XI2000 development system Shenzhen China Xuelin Electronics Co Ltd E 11 Found New Hardware Wizard rs tO z Device Manager Completing the Found New Hardware Wizard File Action View Help The wizard has finished installing the software for ER E 2 a R ag CP210x USB to UART Bridge Controller J Au Sa IEEE 1394 Bus host controllers Keyboards Mice and other pointing devices Monitors E Network adapters JW Ports COM
7. SDA24 EQU SETB SCLK24 SCLK24 EGU P3 6 MOV C SDA24 ORG 0000H MOV ACC 0 C AJMP MAIN CLR SCLK24 ORG 0080H DJNZ R7 RD000 MAIN CLR P3 7 Open write protection RET MOV DPTR TAB PUSH ACC 24C02 into process MOV A 00H Reading address SETB SDA24 TT TT1 TT2 28H 7EH 0A2H 62H 74H 61H 21H 7AH 20H 60H RD24 LCALL RD24 CJNE A 10 TT JNC TTT AJMP TT2 MOV A 00 MOV 30H A MOVC A A DPTR CLR P2 6 MOV PO A MOV A 30H Open LED Sent to show BA A 00H WT24 Subroutine SETB SDA24 CLR SCLK24 CALL START24 Start MOV A 0A0H CALL SHIFT8 Shift CALLACK Response POP ACC CALL SHIFT8 CALL ACK CALL START24 MOV A 0A1H CALL SHIFT8 CALL ACK SETB SDA24 MOV R7 8 CLRA SETB SDA24 RD000 RLA 8 bit PUSH ACC Reading 24C02 CLR SCLK24 CALL START24 MOV A 0A0H CALL SHIFT8 CALL ACK POP ACC CALL SHIFT8 CALL ACK MOV A B CALL SHIFT8 CALL ACK CALL STOP CALL DELAY2 RET START24 CLR SDA24 Conditions began to SETB SDA24 SETB SCLK24 CLR SDA24 CLR SCLK24 RET CLR SDA24 Stop condition SETB SCLK24 SETB SDA24 RET SETB SCLK24 Answer signal CLR SCLK24 RET MOV R7 8 Reading and writing RLC A MOV SDA24 C SETB SCLK24 CLR SCLK24 DJNZ R7 SH01 RET NOP LExperiment 19 p Stepper motor experiment Stepper motor is a kind of controlling component to convert pulse signal to angular displacement or line displacement In the non overloading situation the motor speed and stoppin
8. VCC a a Q 3 Oh L E Lal H ro i l rorowing experiment is a 8 way marqueen program through 74LS138 the 3 way inputs are P1 0 P1 1 and P1 2 Connection method 1 connect inputs JP22 of 74LS138 to P1 0 P1 3 JP44 of CPU by a 4pin cable 2 connect outputs JP25 of 74LS138 to 8 way indicators JP32 org 0000h SETB CC ajmp main CLR BB org 0080h CLRAA AAEQU P1 0 CALL DELAY BB EQU P1 1 SETB CC r CC EQU P1 2 CLR BB MAIN SETB AA CLR CC CALL DELAY CLR BB SETB CC CLR AA SETB BB CALL DELAY CLR AA r CLR CC CALL DELAY CLR BB SETB CC SETB AA SETB BB r CALL DELAY SETB AA CLR CC CALL DELAY SETB BB JMP MAIN CLR AA DELAY CALL DELAY MOV R5 255 CLR CC D3 MOV R2 255 SETB BB D4 DINZ R2 D4 SETBAA DINZ R5 D3 CALL DELAY HET p USExperiment 10 74LS164 serial in parallel out In a single chip system if the parallel I O port resources is not enough and the serial port is free and not occupied then we can use a 74LS164 to extend parallel IO port 74LS164 is a shift register of serial in parallel out and equipped with clear terminal Among the pins Q0 Q7 are parallel outputs A B are serial inputs MR is for clearing 0 for clear output CP is clock input 74LS164 Pin definition 74LS164 Logic table Ve Q Qs Qs Qs MR CP A LS164 2 B 8 BITSHIFT REGISTER 8 cP MR Qo Qi 02 03 04 05 Q
9. amp LPT s Communications Port COMI i e dI EE KE ZER LC Click Finish to close the wizard Li do vi Printer Port gegen E D Processors Sound video and game controllers E System devices Dimmi mm wl E o ee en Lann e 2 olution for Failure of installation If unintentionally terminate the installation of the software you can delete the USB device ith yellow exclamation mark and then repeat the above steps to install it again USB installation for special case Under normal circumstances the installation of USB is as mentioned above Under some special circumstances your computer may have installed other usb printer usb programmer and so on In this case available COM port for USB device maybe COM5 or COME Anyway KEIL software may only support simulation of COM1 COM2 COM8 COMA How do we solve this Here s a better solution to this problem E Device Manager File Action View Help E Action View Help See 4 RS e gt gee Floppy disk drives E A Floppy disk drives Y GN IDE ATAJATAPI controllers GN IDE ATAJATAPI controllers IEEE 1394 Bus host controllers ga IEEE 1394 Bus host controllers keyboards Keyboards Mice and other pointing devices S Mice and other pointing devices ES S E Monitors BY Network adapters Monitors SE Ports COM amp LPT Network adapters F Communications Port COMI 5 9 Ports COM amp LPT pal SU ales A d Communicatio
10. 00H 01H 00H db 01H 00H 01H 00H 01H 00H 01H 00H db 01H 00H 01H 00H 01H 00H 01H 00H db 01H 00H 03H 00H 01H 00H 00H 00H db 00H 00H 00H 7FH 3FH 02H 02H 02H tk db 02H 02H 02H 02H 02H 02H 0FFH 0FEH db 02H 02H 02H 02H 02H 02H 02H 02H db 3FH 02H 00H 7FH 00H 00H 00H 00H db 08H 00H 30H 02H 22H 02H 22H 42H amp db 22H 42H 22H 42H 0A2H 42H 63H 0FEH db 22H 42H 22H 52H 22H 0DAH 26H 42H db 22H 06H 28H 02H 30H 00H 00H 00H db 00H 00H 20H 01H 20H 02H 20H 04H 7J db 20H 18H 20H 60H 3FH 80H 20H 00H db 20H 00H 20H 02H 20H 01H 20H 02H db 7FH 0FCH 20H 00H 00H 00H 00H 00H db 00H 02H 00H 0CH 7FH 0F4H 51H 08H db 55H 10H 55H 3FH 55H 6AH 5FH OAAH db 55H 2AH 57H 2AH 55H 2AH 59H 2AH db 0F1H 7FH 43H 20H 01H 00H 00H 00H db 08H 00H 08H 01H 08H 02H 08H 0CH X db 08H 30H 09H 0C4H 0FEH 04H 08H 08H db 0FH 0FCH 48H 22H 28H 42H 08H 82H db 0BH 02H 18H 02H 08H 1EH 00H 00H end Experiment 17 8155 is an IC works as input and output RAM expansion Characteristics are as follows 256 bytes of RAM A set of 6 bit programmable IO port Two set of 8 bit programmable IO port Programmable 14 bit binary counter timing Multiplexing address and data bus Internal address latches 40 pin dual in line package single 5 v 8155 experiment ADO 12 22 PA1 o 28 29 VSS 20 Connection methods 30 PB1 1 connect PO port JP51 of CPU to JP58 of 8155 part with 8pin line 2 connect P3 4 P3 7 port JP53 of CPU to JP63 o
11. 1PIN with a line connecting the MAX485 development board E control is RE DE were d XI2000 development system Shenzhen China Xuelin Electronics Co Ltd Pp 69 grounded and 5V respectively to be accepted by sending the experiment C51 XP n FREE SA waw Sici com PRAAN ME 8 cate Iw La a L 0553 a08 com 2 sagn cl mene BIGE bl E ss 1001 s DIE ina a 3 l 4900 r C E fiooo as AK DC tesa Babes rg gi br eg e RIE EA gt s P 7 gt ai D Eh 2m ege T KEIER SB SS A i CH En HBA None Els 3 j TF 0755 28794376 11 0 FP 21 0 FB 4800bps Son GSn Z box and hit send button We can see the digital tube 3035 T Send process press down K02 K05 fou keys we can see 4 strings shown on the receiving window of the serial debugging tool S H ss fp HEX mize ean mer Br 7 HE0 So ESE Art ae setdstring special BEF 16800 M DIr ansa joo ms 7K 2 BSS Babes QUER s RTS gt were P RANE BMS SI pe IT RE FRIERI SH eg ob m E ZER HASH one Y 151 abcdefg1234567h 0755 28794376 11 0 FP BI 512 FP 4800bps FOcom PAW 7 XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 70 Experiment 28 A liquid crystal display screen 12864 Pin 412864 of the schematic wiring 15 jumpe lt r Caps to control access not Se 017 ES RACE RES NILO BESSER RSR VO 0 A Oh U PU ra NO
12. FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FR OFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FMF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FP FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DODDO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DODEO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 000FO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF m Check Request Ispro Start Chip Check Lode File Reset Chip fii Auto Setup KE Load Fil S r Write Co EEN PELE an nia ni U ee much less time No Blank Check for d AA ZIDAAA A d av rea lea a rr ea rah P TT CH L nnrhanm hin gt M alin C AOTAN Ina PN el A Q XI2000 development system Shenzhen China Xuelin Electronics Co Ltd E 9 Setup Encrypt 1 x e NONE C 1Level C 2Level C 3Level Program Speed High Middle C Low za Gl Gaz RG Gel L GGG G l 24CXX Address AOPullups ry Middle or low speed for 3Y chip Other use AlPullups PERI A2Pullups AVR MCU SPIEN must be selected Refer to chip datasheets for more info aa lea ag za la les Weg types of chips d Select Chip Chip Class Producer ATMEL 51 ATMEL_AVR Microchi
13. PO 21H T6 CJNE A 1fh T7 MOV PO 7 AH T7 CJNEA 0dh T8 MOV PO 20H T8 CJNE A 19h t9 MOV PO 60H T9 CJNE A 1bh t10 MOV PO 28H T10 CINE A 11h t11 MOV PO 30H T11 CJNE A 15h t12 nn nn U e e em re rm em rm gt rm rm rm rm rm rm rm e d AJMP BIJIAO MOV PO 25H detect continuous code in 118MS T12 CINE A 17h t13 AA MOV R1 25 MOV PO 0a9H i XX ACALL YS2 T13 CJNE A 12h t14 JNB P3 7 HH MOV P0 26H DJNZ R1 XX T14 CJNE A 16h t15 EXIT AJMP START MOV PO 0a1H detect continuous code fa CJNE A 4ch t16 HH MOV R6 4 MOV PO 0b1H S ACALLYSI delay for 882US JB P3 7 EXIT check if high TLL on P3 7 DJNZR6 S repeat 4 times to confirm t16 AJMP AA YS1 MOV R4 20 delay subroutine1 882us D1 MOV R5 20 JNB P3 7 wat high TTL DJNZ R5 LCALL YS3 DJNZ R4 D1 AJMP AA RET BIJIAO MOVA 1CH YS2 MOV R4 10 sdelay subsourtine2 4740us mov pI a D2 MOV R5 235 CJNE A 10h TT1 DJNZ R5 MOV PO 7EH display 1 DJNZ R4 D2 ate CJNE A 03h T2 RET MOV P0 0A2H display 2 YS3 MOV R4 2 delay subroutine 1000us T2 CJNEA 01h T3 D3 MOV R5 248 MOV PO 62H DJNZ R5 T3 CJNE A 06h T4 DJNZ R4 D3 MOV PO 74H RET PE XI2000 development system Shenzhen China Xuelin Electronics Co Ltd E A Y uExperiment 16 Chinese characters display Chinese character display is widely used in automobile
14. R6 23 DUNZ R6 RET END This procedure measuring temperature range from 0 to 125 degree resolution 0 06 degree Connect methods 1 connect JP39 of 18B20 to P3 0 port JP53 of the CPU with a 1pin line 2 connect decoding part JP19 of digital tube to P0 0 P0 3 port JP51 of the CPU with a 4pin line 3 connect decoding output JP88 of digital tube to data port JP5 of the digital tube with a Spin line 4 connect 3 8 decoding part JP22 to P0 4 P0 7 port JP51 of the CPU with a 4pin line 5 connect 3 8 decoding output JP25 to display port JP8 of the digital tube UExperiment 23 NE555 hardware oscillator counter experiment The NE555 Package Irr S SoPbi amp NE555 component can be used in a lot of application circuit and even up to hundreds of application circuit in all types of books are introduced such as home appliance control doorbell alarm signal generator circuit testing equipment components Meter timer the VFC circuit power circuit applications automatic control devices and other applications circuits are widely used because of NE555 cleverly analog circuits and digital circuits ogether because During the plane in the formation of a hardware oscillator by regulating he output frequency W2 JP80 by output can single chip Experimental do count Connection methods 1 connect data port JP5 of digital tube to PO port JP51 of the CPU with a 8pin line 2 connect display port JP8
15. Write DO FF FF FF FF FF FF FF F FF FF FF FF FF FF Verify FF FF FF FF FF FF FF FF F FF FF FF FF FF FF Write Encrypt y 100080 FF FF FF FF FF FF FF F FF FF FF FF FF FF Encrypt Setup O0090 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OO0AO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OOOBO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OOOCO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OOODO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OOOEO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF OOOFO FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Auto Progr Welcome to www 51c51 com 1 software status information window 2 code and data zone Show information about the current Show the code data that is burned into programmer status of current connection chip also you can edit the code data directly serial port chip and target object file here 3 Intelligent all steps in one button 4 Intelligent button set up window One of the features of this software you Can Show the status of each step about the achieve fast programming Please refer to thewhole programming process includes update details of the relevant sections file checking chip erase write verification encryption etc 5 file update reset the target board Manually updates the target file Pressed the button to reset the target board It is helpful for on line debugging 7 status report on the operation of window menu an
16. block write protection CMD16 Set the length of the block CMD30 Ask the card for the status of the write CMD17 Reading a single block protection bits CMD18 Read more block until the host CMD12 so farclass7 The card lock unlock the function of Class4 Write card orders command set CMD24 Write a single block class8 Application specific commands CMD25 Write more blocks classi0 11 Reservations One class1 class3 class9 SPI mode does not Support Connection methods 1 connect SD card part JP74 to P1 0 P1 3 6 pat port JP44 of the CPU with a 8pin line na esvere 2 connect power line of SD card to the 5V and GND of the XL2000 board with 2 1pin lines Liz 3 connect PO port JP52 of the CPU to 8way indicators JP32 with a 8pin line Please refer to the SD card program in the CD burn it into the CPU and you will see 8way marqueen Remove SD card the O m mtd Hlejejejejo loJ o o 7 SEA DID gt ftt puus t Gi Bees Kee Les A QO Kleer Deen Paez Et ae W I OTT STT aor Bid SU HE marqueen stops LS Experiment 27 485 communication experiment RS 232 has exposed advantages of low transmission speed short transmission distance and high signal disturbance at the interface in the modern communications The transmission distance of RS 485 could reach 1200m a S MAX485j5 5 4 V V A EN E z HILYIANOI Co a DI RO DI MAX485 1C22 I i SS8 WLS
17. detecting KS MOV P1 0FH K1 LCALL DELAY2 MOV A Pi LCALL DELAY2 call delay to remove XRLA 0FH RET DELAY2 MOV R5 08H L7 MOV R6 0FAH I D shaking i i LCALL KS call key detecting i JNZ K2 i AJMP KEY i K2 MOV R2 0EFH sstore key value to R2 L DJNZR6 L8 i MOV R4 00H move 1 column to R4 DJNZ R5 L7 i K3 MOV P1 R2 move R2 to P1 port RET i L6 JBP1 0 L1 tab i MOV A 00H db 28h 34h 28h 34h 0a9h 60h 20h 7ah AJMP LK 20h 21h 61h 74h 30h 62h 0a2h 7eh i L1 JBP1 1 L2 i i MOV A 04H i i AJMPLK i i L2 J4BP1 2 13 i MOV A 08H send 3 row value to end ACC AJMP LK S OH NT h Rn ka Te la INA V IA N ka nAtTAn NE x rn AN 7 A henzhen China Xuelin Electronics Co Ltd 34 lopment system S NVIONN MN I f b ZA f ell ea A zUUU qeve Z Ni Gan L YW WW VW SAAS Experiment 8 74LS14reverser 74LS14 is a 6way reverser the definition of pins as left figure A for input Y for output that is pin 1 3 5 9 11 13 for inputs pin 2 4 6 8 10 12 for outputs In this instrument two 74LS14 chips are used to consist of a 8 way reverser TOP VIEW org 0000h delay mov r5 50 Call delay ajmp main di mov r6 40 org 0080h d2 mov 17 4248 main mov a 0 djnz r7 i loop mov Dia P1 port output i djnz r6 d2 call delay keep on for a while djnz r5 d1 inc a show next figure ret jmp loop i end I
18. lights XL2000 running photos p Experiment 4 static scanning of the digital tubes 74LS47 chip is a driver chip of 7 segment tube the number could be converted to the numbers that directly displayed in LED tubes through it Therefore the program could be simplified and also the IO resources could be reduced However from the cost saving point of view such kind of chips have less used in the market In most cases dynamically scanning tube is used to implement digit number display From students perspective it is necessary to understand this type of IC application The following is the connection diagram for 74LS47 TOP VIEW 174LS47 104 RAR Connection method connect the decoding part of the digital tubes JP19 to PI port JP44 that is P1 0 P1 1 P1 2 P1 3 etc XL2000 running photos Program this program is sending number 0 1 2 3 to P1 port in turn and digital tube is showing these numbers accordingly org 0000h start CALL DELAY ajmploop jump to 0030h JMP LOOP restart e org 0080h i DELAY MOV R5 50 delay subprogram LOOP D1 MOV R6 40 MOV P1 1 set 1 to pi port D2 MOV R7 248 CALL DELAY delay DJNZ R7 MOV P1 2 set2 to p1 port DJNZ R6 D2 CALL DELAY delay DJNZ R5 D1 MOV P1 3 RET CALL DELAY END MOV P1 4 i neon nanna nn0 n sQ 0cnacnrcoccniscc srconQconconcpccectitic nm Q 0 000000006000
19. mode but not in simulation mode In the simulation mode some system resources are occupied to support the simulation functionality The situation is not 100 same as the real programming running environment If you have doubts about the simulation result then please switch to ISP programming mode Under normal circumstances suggest the use of programming experiment mode Ee How to do if want to use 2051 single chip Compared with 89551 chip 2051 is only lack of pO and p2 port The programming model and the instructions are both the same So you can use 2051 chip as your wish only need to pay attention to avoiding the use of pO and p2 port If you must use 2051 then we can offer you other programmers with a discount ls 89852 totally same as 89C51 89552 is an upgrade version of 89C51 and their instruction set is completely compatible and can substitute for each other Compared with 89C 51 89552 has the advantage of lower price and longer life expectancy At the same time 89552 is configured with the watchdog and ISP downloading functionality Introduction of XL2000 experimental system Xuelin Electronic Co Shenzhen www 51c51 com A aM ali WSIIOIZIIONI Wl IONUGIIII I Vul Ul ilo VU LLU Chapter VIII System configuration and post sale service guide standard configuration this configuration changes according to different situations XL2000 an integrated single chip simulation programming instrument
20. of digital toue to P2 port JP52 of the CPU with a 8pin line 3 connect JP80 of NE555 to P3 5 of the CPU with a 1pin line XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 64 a ET Ka L ve ii E le De a www ale l com 200023 5552039 SEI Breterence program a_bit equ 20h 000 bit register 1 Show b bitegu 21h 10 Register mov dptr numtab Send data c_bit equ 22h 100 Register d bit equ 23h mov a a_bit To send 000 bit data e bit equ 24h MOVC A A DPTR Look up f bit equ 25h org 0000h mov p0 a I send pU show ajmp star clr 02 6 Select the first digital org 0080h Star Initialization acall dims Show ims all the All Clear setb p2 6 Show to close mov a 00h mov a b_ bit 10 to send data mov a_bit a MOVC A A DPTR Look up mov b_bit a table mov c_bit a mov p0 a I send pO show mov d_bit a clr p2 5 Select the second mov e blt a digital control mov f bit a acall dims Show ims Stlop acall display Call display setb p2 5 Show to close jb p3 5 stlop Monitoring keyboard mov a c bit hen press the implementation of the show MOVC A A DPTR 03 2 mov p0 a e acall display Maintaining the clr p2 4 show acall d1 ms acall dims l setb p2 4 1ms delay to avoid a keyboard malfunction mov ad bit jnb p3 5 we P3 2 if not continue MOVC A A DPTR 0 delay opening mov p0 a count Part of the clr p2 3 calculations acall d1 ms inc a bit mov a a bit cjne a 10 stlop mov
21. 0006000602020600020060 0060005000 Q encoQcrcecQcnssnrcoercne Experiment 5 Digital tubes display 01234567 dynamically I AN Gw i d A 0 e rrr Lk ka em ta sp Lea em ke a S eT af le ris rie i w N WILY JI Id Schema graph data cables of 8 lights are bundled into JP5 the bit control is driven by 8 PNP triode and wired out from JP8 BG4 BG6 BGS BG10 BG11 BG13 BG15 BG17 CB CB CB CB OF CB eh di eE E E 0 ne di l I i i i l ak Unie ak llena ax tri 4k7 Uris 4K7 Ups 4k7 UI R23 4K7L R25 4K Re6 E LES P23 SES 5 P325 EES P27 JPG 0123456739 DEI 28h 7eh Oa2h 62h 74h 61h 21h Fah 20h 60h Mussi al t sa e How the digital tubes display numbers like 1 2 3 4 The digital tubes in fact consist of 7 segment tubes with shape 8 plus a decimal point We names them as A B C D E F G H SS A B C D E F UG H Di MAMA COM L ppppppyY After understanding the display principle if we want to show a figure 2 turn on the A B G E D tubes will do From the hardware connection we can program as follow we have several 7 segment tubes let us assume last one P2 7 LOOP CLR P2 7 _ Finally select the digital control SETB P0 7 Section B does not shine SETB P0 5 Decimal point does not shine SETBPO 1 C section do not CLR P0 2 Other all CLR P0 3 CLR P0 4 CLR P0 6 CLR PO O JMP LOOP Jump to re start END After compiling and burning this program into
22. 0110010b T2 MOV P0 0A2H display2 mov p0 0ffh T2 CJNE A 00110011b T3 MOV PO 62H T3 CJNE A 00110100b 14 MOV PO 74H T4 CJNE A 00110101b 5 MOV PO 61H T5 CJNE A 00110110b T6 MOV PO 21H Serial set up wor Data sent to a buffer CJNE A 00110111b 17 MOV P0 7AH CJNE A 00111000b T8 MOV PO 20H CJNE A 00111001b t9 MOV PO 60H setting 4800 19 CUNE A 00110000b t10 I3 mov dptr ok1 Table head home ajmp senda3 senda3 clr a move a a dptr cjne a senda_3 ajmp start Encountered in the senda 3 mov sbuf a Send data JNB TI CLR TI inc dptr Limp senda3 mov dptr ok2 ajmp senda3 mov dptr 0k3 ajmp senda3 mov dptr 0k4 ajmp senda3 OKT db 0dh 0ah 0dh 0ah You button p3 2 0dh 0ah LEDlok2 db 0dh 0ah 0dh 0ah You button p3 3 0dh 0ah ok3 db 0dh 0ah 0dh 0ah You button p3 4 0dh 0ah ok4 db 0dh 0ah 0dh 0ah You button p3 5 0dh 0ah end Table head home2 Table head home Comparing Table head home4 LED display1 da M r A N A AN AVA I AAMANT CO J Ca CA A CAN la CN n gt la i nA V IA j a C not r ala b rate A N b A AIZUUU qeve LU L ment SVSTEM onenNnznen fifa Al CITI CIECIHOTICO UO LIU II d J 5 Experiment 22 18B20 digital temperature display system Limited to XL2000 XL600 needs extra purchase of the chip To complete controlling of temperature conversion with DS18B20 it is necessary to go through three
23. 1 Z 3 1 5 ZE 5 In this package all of the pins have been connected with CPU already You can control the 15 jumpers to decide if the LCD is active in circuit If you want to activate LCD then the 15 jumpers should be closed else keep them open to avoid disturbance W3 is used to adjust the contrast 12864LCD mechanical size chart 93 04 0 3 90 0 0 3 58 04 0 t0 5 2 5 70 0 3 65 0 the definition of 12864 LCD pin TTT TTS TTS TS TR Nu ml Mii TT DI RW E peo s DEI pes pes Des TSTS TS nc TS BLA TSE NM Reference show letter A on the LCD RS EQU P2 0 ACALL DELAY RW EQU P2 1 SETBE E EGU P2 2 AJMP ORG 0080H ENABLE CLR RS send orders MOV PO O00000001B Clear display CLR RW ACALL ENABLE CLR E MOV PO 00000001B Clear display ACALL DELAY ACALL ENABLE SETBE MOV P0 00111000B Display RET ACALL ENABLE DELAY MOV PO OFFH MOV PO 00001111B Display control CLR RS switch SETB RW ACALL ENABLE CLRE MOV PO 00000110B Input mode NOP ACALL ENABLE SETBE MOV PO 0C0H Data memory JB P0 7 DELAY detect busy address RET ACALL ENABLE END mov p0 01000001b ASCII Code XL2000 running photo after the completion he effect of running 12864ZIKU HEX inthe of the experiment please remove all the JP41 CD jumpers Chapter VII Frequently Asked Questions If you are a beginner then strongly recommend that you carefully read the following When you have somet
24. 100 test OK on board configured with a piece of 89552 and 12864 LCD U U U U U U U 8 i one backup 89s52 chip one simulatlon module one serial communication cable one USB cable ultra thin infrared remote controller HT6221 40PIN simulation head cap 10PIN ISP downloading head cap 15 pieces of connecting pin line one manual this handbook one software CD drivers software tools example sources single chip document and tutorial S Warranty In the absence of self repair demolition cases the products sold from the three months from the date OZ free of charge for three years free warranty Experimental chip with the exception of LCD with the customer directly to the company or agent to replace technical support Any user of this product go to the latest forum http www 8951 com bbs index asp and register an account for getting more help and more sources In the forum at any time dozens of friends are ready to share with you the joy of learning For more information and source click www 8951 com www 51c51 com Technical Forum http www 8951 com bbs index asp d G D FIFULF m Ho coe t Hd e b SE Si ia Ae SCAN l Te v Y R eee s User Survey Card Dear users please fill out the following information carefully after the self scan or sent to the mailbox owner SXJ1974 163 COM We will recover the user s card users randomly selected 10 of the gift attractive prizes Thank you fo
25. 13g we max485 schematic This experiment needs RS 232C RS 485 adaptor This component is not in the package and need extra payment for it Hardware connection connect RO pin of MAX485 to the serial receiving pin RXD P3 0 of the CPU DI pin of MAX485 to TXD pin P3 1 of CPU Because of half duplex communication mode we can not send and receive message simultaneously We can only control the state of RE DE pin to switch receiving and sending Here we connect RE and DE pin together when assert low voltage on it MAX485 is on receiving state when high voltage 5V MAX485 is on sending state From software perspective RS232 is same as MAX485 Please refer to the CD for the reference program Testing methods When the program MAX485 HEX is burned into chip please close the xlisp software Press down JP17 programming simulation to simulation mode Open serial debugging tool sscomv20 in the CD Select the COM port usually COM1 and set baud rate as 4800 Connection methods 1 connect keypad part JP37 to P3 port JP53 of the CPU with a 8pin line 2 connect data port JP5 of the digital tube to PO port JP51 of the CPU with a 8pin line 3 connect display port JP8 of the digital tube to P2 port JP52 of the CPU with a 8pin line 4 connect RO of MAX485 to P3 0 DI to P3 1 with 2 1 pin lines 5 connect PC serial port with MAX485 adaptor 6 connect D D of MAX485 adaptor to MAX485 port A B on the board with 2 1 pin lines
26. 51 we will show the source code running photo line connection method and principle schema for each examples Of course XL2000 is not limited by the examples presented here thanks for the module design of this experimental instrument user can configure the hardware modules with most flexibility and program against the configuration By this way user can have a comprehensive of C51 programming and designing For more asm and C sources please refer to the examples in the CD shipped with the package as well as the latest update at www 8951 com LC Experiment 1 The simplest eight way marquee program In this experiment delay subroutines clr Icall ajmp instrunctions will be used Over these program elements we can see eight lights flashing in turn through P1 0 to P1 7 port User can learn from this example and have a initial grasp of the IO port programming Practice 1 How to make the time of delay subroutine a bit shorter or longer Practice 2 How to use PO P2 and P3 ports to implement the same control of 8 way lights Practice 3 how to implement different patterns in the light flashing Related schema Y VCC PIO 1 Pil 7 Pl2 3 PI3 4 4 IU 023 Pl4 5 H PIS e A Pig 7 I PI7 8 R97 P33 13 10K P32 12 K16 P35 15 I P34 14 VCC GE USER JP89 TS XT1 19 XT2 18 REST 9 O SEL JT2 19M I O 22 22 C24 ERRATE gt T P36 16 design www 51c51 com pR XI2000 development system Shenzhen China Xuelin Electr
27. C A m 1 C o a EN e KA XI2000 develo DIMent SVStlei nTi She enzhen I Chi ina AL elir E Elec ctrc Lo UO LIQ Jp FRexpertment 2 20 93c46 demo Pin definitions and connecting graph ZA DIP Package Pi RITA a H JH 1 8 RE 6 X ae C cc be in Note pin 6 org is 16 8 mode selection this pin is connected to GND for XL2000 so it can only work 93046 SL 4 under 8bit mode 93C46 running photos of the Marquee Connection methods 1 connect P3 4 P3 7 port JP53 of the CPU to input port JP46 of 93C46 with a 4pin line 2 connect P2 port JP 52 to 8way Indicators JP 32 with a 8 pin line This program sends 8way marquee data to 93C46 first then reads and sends it to P2 port for display Running this program you can see 8 way marqueen To show the role of 93C46 you can remove the connection line and then no marqueen EQU 0 Reading 93C46 CALL SADR l EQU 2 Write 93046 7 write the address DI CALL EQU 4 93C46 write enabled Reading DO into 3CH EQU 6 disable 93C46 writing MOV RAA BIT P3 7 93046 CS JMP EX9346 BIT P3 6 93C46 CLK SWRITE MOV A 40H Send opcode01 BIT P3 5 93C46 DI CALL SDATA BIT P3 4 93C46 DO MOV A ADR46 ADR46 EQU 20H 93C46 included in the address CALL ORG OOH SADR 7 write the address STARTO MOV 21H 00H Access code MOV A R4 Write 3CH data MOV 22H 08H 8 Group 8 MOV P3 10H MOV ADR46 00H 93C46 address Write enabled CALL TO9346 MO
28. DC0804 J3 with 2pin line 2 connect P1 port JP44 of CPU to data input of ADC0804 JP35 with 8pin line 3 connect PO port JP51 of CPU to 8way indicators JP32 with 8pin line Running photo adjust ADJ3 with a small screwdriver you can see the change on the 8way indicators 12000 development system Shenzhen China Xuelin Electronics Co Ltd Experiment 14 Small alarm bell experiment Sound is generated by the vibration Vibration of a certain frequency will generate a certain frequency of sound The experiment is about generating a long and short alarm tick from speaker Connection connect P3 3 port JP53 of CPU to input JP16 of small speaker with 1pin line SPEAKER VE Breterence program ORG 0080h div mov r2 08h 1kz duration dlv1 mov r3 0fah dlv2 cpl p3 3 1khz square wave output Icall d5ms Call Delay 1 djnz r3 dlv2 last for 1 second djnz r2 dlvi mov r2 10h 2khz Duration dlv3 mov r3 0fah dlv4 cpl p3 3 2khz square wave output Icall d25ms Call delay2 djnz r3 dlv4 djnz r2 dlv3 sjmp dlv repeat d5ms mov r7 0ffh Delay subroutine 1 loop nop nop djnz r7 loop ret d25ms mov r6 0ffh Delay subroutine 2 lin djnz r6 lin ret End p NExperiment 15 Infra red remote control experiment bit PL bit 17 plavat i 0 56ms 1 125ms 2 25ms 2 Gagn 0 m 61 XL2000 running photos The decoding key is how to identify 0 and 1 from the place that we can find the
29. HO LOW 65536 10000 10MS timer interrupt MOV TLO HIGH 65536 10000 RETI T1MS mov r5 00h mov r6 9 dinz r6 djnz r5 tt ret rnr SEE Jaj program MAIN MOV SP 60H MOV P2 0FFH MOV R2 8 Data Read out the Read out Io send Finally a H Delay subroutine 992 MOV 49H 255 551 MOV 4AH 255 SSO DJNZ 4AH SSO DJNZ 49H SS1 DJNZ 48H SS2 MOV P1 11111100B CLR EA LCALL RST JNB FO KEND MOV R0 0CCH match LCALL SEND BYTE MOV RO OBEH i Reading an order issued by the temperature LCALL SEND BYTE LCALL READ BYTE MOV WDLSB A LCALL READ BYTE MOV WDMSB A LCALL TRANS12 KEND mov p1 01010101b SETB EA RET skkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Temperature conversion the precise 0 06 TRANS12 MOV A 30H ANL A 0F0H MOV 3AH A MOV A 31H ANL A 0FH ORLA 3AH SWAP A MOV B 10 DIV AB MOV 43H A MOV 42H B MOV DPTR TABB MOV A 30H ANL A 0FH MOV B 2 process MOV RO 40H OVER MOV RO 00H INC RO DJNZ R2 OVER MOV TMOD 01H MOV THO LOW 65536 10000 MOV TLO HIGH 65536 10000 SETB EA SETB ETO SETB TRO LOOP read out the temperature program SJMP LOOP DS18B20 readout process DSWD CLR EA LCALL RST JNB FO KEND response to return to the main program MOV RO OCCH LCALL SEND_ BYTE Skip ROM match MOV RO 44H conversion to issue an order LCALL SEND_ BYTE SETB EA MOV P1 00001111B MOV 48H 1 hen more than ready to read LCALL WRITE 0 SJMP GEN LCALL W
30. JP44 P1 output port P1 0 P1 7 JP60 AD jumper Default state is on if needing external analog signal input from AD input port JP30 ADJ13 AD experiment Used for analog signal adjustable 10K resistor JP24 DAC0832 control end in this system connect WR to P36 CS to P27 JP27 DACO832 data end in this system connect to PO port J2 DAC0832 output end connect to oscilloscope JP41 LCD experiment jumper when doing LCD experiment make it closed Note here we have 12864 LCD 4 Analog to Digit converter ADC0804 5 Digit to analog converter DAC0832 6 LCD display 12864LCD 7 8bit digit led JP8 control end in this system connect to P2 port data end in this system connect to PO port ee 37 lt lt ue oo ae 15 24C 02 JP38 24C 02 control in examples SLC is connected to P3 6 SDA to P3 7 16 speaker JP16 Input signal for speaker in examples connected to P3 3 JP45 Input signal for remote receiver in examples connected to P3 7 18 18B20 JP39 Output for temperature detector in examples connected to P3 0 20 8way indicator JP32 Correspond to D00 D07 lights 0 on 1 off 21 matrix switches JP50 Correspond to 4 4 matrix keys in examples connected to P1 22 1 way relay output Correspond to JPOO relays Correspond to J00 J07 dig switches on 0 off suspending 32 8155 extension vPSSIOrcontol IPS or data JPOT Or PERO 000 JP54 Row scan for bottom half in examples con
31. MI C COM2 e COM3 C COM4 COM3 OK OK Cancel After USB driver installation is complete running XLISP exe and pop up a COM selection dialog box select one port and clic auto detecting button until one is OK Same scenario when doing KEIL UV2 simulation o serial port communication experiment we must choose the COM port Chapter 4 Using ISP downloading part A 4 1 ISP to download part of the presentation ISP In System Programming means the device on the board can be programmed directly with end user code data do not need to get the device off from the circuit board ISP technology is the development trend for future The ISP part of XL2000 is the leading product on the market with traditional programmer s reliability and ease of use download line Through the single chip timing control RS232 serial communication solves the problems of parallel port ISP compatibility and reliability By introducing the related pins of the ISP download head into the circuit board we can program the board online with great speed and convenience a 91 Series single chip Ar89551 AT89S52 AT89S53 AT8958252 AT89LS51 AT89LS52 AT89LS53 AT89LS8252 ISP to download a list of some of the support of the chip AVR Microcontroller Series AT9052323 AT9052343 AT9054433 AT9058535 ATmega16 ATmega16L ATmega161 ATmega161L ATmega163 ATmega32 ATmega32L ATmega323 ATmega323L ATmega64 ATmega64L ATmega8 ATmega8L ATmega8515 ATmega8515L AT
32. MOSI SDA 10 RST Red 1 pin Emulators port The order direction of The pin definition on thelhe plug 1 there has a mapping withtriangular symbols make sure other chips anti clockwisedownloading head to avoid pick the wrong line direction Tips if you are still not sure the order of pins better have a check with multi meter after connecting Special attention The pin 4 5 of the downloading head is already provided with 5 power supply therefore there is no need to configure a power for the target board At the first use of the downloading head please check if the power is not short circuit on the board As well as if the pins of ISP is connected correctly You can refer following to connect the ISP downloading head http Awww 51c51 com bbs dispbbs asp boardID 198 amp ID 28470 amp page 1 In addition because of the use of the downloading functionality of S51 series of single ship part of software XLISP make sure there is no chip in the socket of XL2000 when using the downloading head A 4 3 ISP pin connection method with typical chip Here are some ISP pin connection methods with a typical chip Please refer to chapter two for the software operations YINNNN sl eau re l e a r ew ak vetam Ohanshan Rainn Viinlin Clantraninna La X12000 develo pment System nenzhen C hina Xuelin Electronics Co Lta gt AT89S Series AVR family connection method refer to the self made 89551 target board
33. P2 5 i MOV PO 28H display 0 MOV PO 61H i LCALL DELAY calldelay LCALL DELAY i 3 MOV PO OFFH turn off 0 MOV PO OFFH i SETB P20 SETB P25 CLR P24 select 2 digital tube CLR P26 i i MOV PO 7EH display 1 i MOV PO 421H i LCALL DELAY LCALL DELAY 3 MOV PO 0FFH 3 MOV PO OFFH sem Pai sem P26 CLR P2 2 select 3 digital tube i CLR P2 7 i MOV PO 0A2H display 3 MOV PO 7AH LCALL DELAY i LCALL DELAY i i MOV PO 0FFH SETB P2 7 SETB P2 2 MOV PO 0FFH i CLR P23 l AIMP MAN restart i i MOV PO 62H display 3 DELAY delay subroutine LCALL DELAY i MOVR7 2 i 3 MOV PO OFFH Di MOVR6 425 i sem P23 pe DJNZ R6D2 om P24 DG pp i 3 Leer 3 pra A YIONNNA dar A NAM ant evetar CH L nnrzhan hin a V alin C ACTFA Nine el ta 21 XI2000 development system Shenzhen China Xuelin Electronics Co Ltd 2 SS VE xperiment 6 portbutton press detecting technologies display button This part consist of 8 touch keys one end to the ground the other end is wired out from JP48 When press the key the corresponding port is low TTL Key port schematic fl ALB 1 2 3 4 5 6 pI 8 Connection methods 1 connect JP48 to P3 port JP53 of CPU by a 8pin cable 2 connect data port JP5 of the digital tube to PO port JP51 of the CPU 3 connect display port JP8 of the digital tube to P2 port JP52 of the CPU Ba
34. RITE 1 DJNZ R5 SEN3 Reading a MOV R5 8 READ1 LCALL READ RRCA DJNZ R5 READ1 LCALL DSWD DS18B20 call to lf there 8 cycle times to 8 cycle times MUL AB MOVC A A DPTR MOV 41H A MOV A 30H ANLA 0FH MOV B 2 MUL AB INCA MOVC A A DPTR MOV 40H A RET TABB DB 0 0 0 6 1 2 1 8 2 5 3 1 3 7 4 3 5 0 DB 5 6 6 2 6 8 7 5 8 1 8 7 9 3 skkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk H temperatureSEND_ BYTE Send a byte program MOV A HO MOV R5 8 SEN3 CLRC RRCA JC SEN1 iS no Temperature CLR DAT MOV R6 30 DJNZ R6 SETB DAT RET byteWRITE_1 CLR DAT NOP NOP NOP NOP NOP write 1 reading a byte MOV RO A RET Reset process if the location of the complex FO did not reset FO RST SETB DAT NOP NOP CLR DAT MOV R6 250 and pulse duration 3yusx200 600us DJNZ R6 MOV R6 50 DJNZ R6 SETB DAT bus changed line input MOV R6 15 DJNZ R6 CALL CHCK Call response inspection procedures MOV R6 60 DJNZ R6 SETB DAT RET CHCK MOV C DAT JC RSTO SETB FO Chi FO SJMP CHCKO RSTO CLR FO CHCKO RET A Signal Host fat reduction The release of the host FO is not ready to reset was detected SETB DAT MOV R6 30 DUNZ R6 RET A reading of the data program READ SETB DAT 1US have a reset signal the start time NOP NOP CLR DAT NOP NOP SETB DAT DAT home prepared to receive data NOP NOP NOP NOP NOP NOP NOP MOV C DAT MOV
35. Real time clock PS2 Experimental Crystal freedom of choice Single chip on line 8155 IOExperimental 12864 Chinese standard max 485 Communications sd card modules MAX232 Serial 16 16 Chinese dot matrix Mcp2551 can be reserved 18B20 Digital temperature Communication screen bus collector The XL2000 features 1 Entirely open mold designing What is the entirely open mode All hardware resources are open for users They are not pre connected on the board You can combine various hardware resources into a simple working embedded system as you wish You have the most flexibility to configure the hardware and programming on it For example when you are writing a marquee program you can write P1 port or P2 port without any limitation on the hardware pre connection You only need to change the connecting wires of the system By this way you are not limited by the pre connection among the hardware resources and have more intuitive feeling about how the software is controlling the hardware deeply Actually XL2000 is the only development board which supports entirely open designing in the market 2 high quality technology This experimental box employs transparent Jacques power panels with aluminum alloy containers made by machines with surface mount technology The workmanship is fabulous 3 Super powerful hardware resources configuration It integrates almost all the possible functional module parts oriented to the real application
36. SB interface Installation Guide XL2000 provides a serial or USB communication for your options In the above chapter we introduced the use of serial communication experiment If you use the USB communication serial lines can be removed At the same time please pay attention to switch jumper JP13 JP14 to USB end Please follow below steps to install USB serial driver Step one connect XL2000 to PC USB socketiStep two Select in the search to include the by the USB cable in the package Found Newlocation click browsing to open CD and Hardware Wizard is showed select from thejswitch to the folder drivers XLISP drivers list or specific location Advanced option USBDRIVER2 0 Enter the next step Enter the next step Found New Hardware Wizard i Found New Hardware Wizard Please choose your search and installation options Ne Sy This wizard helps vou install software for SE Gd Search for the best driver in these locations CP210x USB to UART Bridge Controller Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed m E C Search removable media floppy CD ROM If your hardware came with an installation CD 22 or floppy disk insert it now Include this location in the search E DRIVERS usbdriver2 0 iv What do you want the wizard to do O Don t search will choose the driver to install gt
37. V A 21H included in the guide MOV DPTR TABLE TABLE to check Access code MOVC A A DPTR MOV R4 A Deposit into the MOV A WRITE CALL TO9346 MOV A EWDS Write data Write to CALL TO9346 INC 21H INC ADR46 1 yards off The next CALL DJNZ MOV DELAY 1 22H START RO 30H 51 into the RAM MOV ADR46 00H 93C46 00 MOV 22H 08H 93C46 8 yards MOV A READ Reading address CALL TO9346 MOV A R4 93C46 output data included in the ACC MOV RO A INC ADR46 The next time RO DJNZ 22H A1 MOV 22H 08H MOV RO 30H OUTPUTIMOV A RO The next RAM A2 CALL SDT46 JMP EX9346 SEWEN CLR A Opcode to send 00 CALL SDATA MOV A 60H So that the code can be written 11XXXXX CALL SADR JMP EX9346 SEWDS CLR A Opcode to send 00 CALL SDATA CLR A 7writecodeto prohibit operation OOOXXXX CALL SADR EX9346 CLR CS RET CLR C RLC A MOV R3 7 JMP SD1 MOV R3 2 JMP SD1 MOV R3 8 SADR SDATA Into the 8 bit RLC A MOV SETB CALL CLR CALL DJNZ RET RDT46 MOV R3 8 Read out the 8 bit data RD1 SETB CLK CALL DELAY CLR CLK CALL DELAY MOV C DO RLC A DJNZ R3 RD1 RET DELAY MOV R7 0FH DI C CLK DELAY CLK DELAY R3 SD1 MOV P2 A Output to P2 DJNZ R7 CALL DELAY1 RET INC RO DELAY1 MOV R4 20 DJNZ 22H OUTPUT D1 MOV R5 20 JMP A2 D2 MOV R6 248 SETB CS 93046 CS 1 DJNZ R6 SETB DI DI 1 DJNZ R5 D2 SETB CLK CLK 1 DJNZ R4 D1 CALL DELAY Sta
38. a_bit 00h inc b bit mov a b bit cjne a 10 stlop show mov b_bit 00h 10 inc c bit mov a c bit cjne a 10 stlop mov c_bit 00h inc d bit mov a d bit cjne a 10 stlop mov d_bit 00h inc e bit mov a e bi cjne a 10 stlop mov e_bit 00h inc f bit mov a f bit cjne a 10 stlop mov f_bit 00h ajmp stlop 000 plus 1 setb p2 3 mov a e bit If less than 10 show If the removal of 10 plus 1 MOVC A 2 A DPTR mov DU a clr p2 2 acall d1 ms setb p2 2 If less than 10 mov a f bit If the removal of 100 plus 1 D1MS numtab MOVC A A DPTR mov DU a clr p2 1 acall dims setb p2 1 ret LED Delay MOV R7 2 DJNZ R7 RET LED code table db 28h 7eh 0a2h 62h 74h 61h 21h 7ah 20h 60h 0123456789 end U I CISCUOLMCS LUO LLU Experiment 24 DS1302 real time clock experiment DS1SOZ B 100UF 10V VCC 2 FBZ DS 13029 FPR A Connection methods 1 connect keypad part JP37 to P1 4 P1 7 port JP44 of the CPU with a 4pin line 2 connect data port JP5 of the digital tube to PO port JP51 of the CPU with a 8pin line 3 connect display port JP8 of the digital tube to P2 port JP52 of the CPU with a 8pin line 4 connect speaker part JP16 to P3 3 port of the CPU with a 1pin line 5 connect relay part JP18 to P3 5 port of the CPU with a 1pin line 6 connect DS1302 part JP83 to P1 0 P1 3 port JP44 of the CPU with a 4pin line Please refer to the
39. ally the definition and intention of wire jumpers 3 Pick up the example which suits your situation from the handbook to do experiments If it could be run smoothly please think about why this example is written like this And then try to change some statements in the program and then see the result on the board By this way you can have a deep impression how the software Is driving hardware acting as you wish We believe this is the best way to learn how to program an embedded system 1 2 Each interface module definition wi ve Em la t i LS LH ml x 1 rao imma a CEA OR LI Te Ra RZ O Nas d Na LAR Ka X12000 8051 Development board XUELIN electronics JP2 USB communication port for communication simulation programming and power supply Pi RS232 communication port exclusive with USB communication anyway when use downloading J RS232 communication also need USB cable to supply power JP23 ISP downloading head support to download program from host PC to board It needs basic understanding of the chip will be burned 2 power supply JP33 Power switch It is only applicable for extra power supply When using USB for power supply it is invalid J4 Extra power input Default with USB for power supply no extra power input 3 CPU simulation IC16 Experimental socket When programming insert AT89S52 and simulating with SST89E564 attention make sure the chip breach is up
40. and set baud rate to 4800 Connection methods 1 connect P3 port JP53 of CPU to keypad part JP48 with a 8pin line 2 connect PO port JP51 of CPU to data part JP5 of digital tube with a 8pin line 3 connect P2 port JP 52 of CPU to display port JP8 of digital tube with a 8pin line Receive process input 1 in the string input box and hit send button the digital tube will show 1 Send process press down K02 K05 of XL2000 you will see sscomv20 software receives 4 strings The process of receiving Input string in a box then send XL2000 digital display is a pipe 2 shows that the importation of 2 C51 XP ET ARES 51 WA www 51c51 com ERBA IZEG fo 5 HEX ser ee mera Ir HEY R s RL ASO d A Bere arme Sen BRE 4500 M pR r cms joo weit a Ra bE SE Z M RTS F weem i RETE BANE L L E r D K sta 4 ry SIb iz CTS 0521 B TROB ER www 51c51 2321 BAT AM KEE Ce www 51ch m FITE Non F RISI 3bcdefz1234567h 0755 28794376 Tx 0 FP Rx 512 FP 4800bps HOcom ATF 74 XL2000 receives 0 from PC PC receives strings from XL2000 amp Reference program main0 MOV 20H 00H MOV TMOD 22H MOV SCON 40H MOV TH1 0F3H 12M Crystal MOV PCON 80H SETB TR1 Hate Allowed to receive Open LED mov p0 0ffh rec mov a sbuf mov pl a CJNE A 00110001b T00 he received data MOV PO 07eH mov p0 0ffh 00 CJNE A 0
41. ard socket and press down he system he RESET button on the board d to Monitor 51 V4 5 Load UC Ssss ae Sa MA Sens ASM ASSIGN BreakDisable HreakEna Build A Command A FindinFiles Press the third red d debug icon or ctrl F5 to enter the simulation At this point the interface shows connection is successful Or there is some wrong with Settings please double check Successful simulation screen Click the running at full speed button as the red arrow points and connect experimental ld Oo resources This experiment connects the P1 JP44 of the CPU to the eight way indicator lights JP32 by a 8PIN data cable 4 P F Atthis time you will see eight XL2000 red LED is flashing one by PARR one this means the success of the experiment When exiting the simulation press down the RESET button of XL2000 and then click d the IDE will return to the editing mode Press down the red d again back to simulation mode Up to here we have completed a standard KEIL software process You can hit single step running to watch the change of register and also change of the board By this way you can understand the process of the program running Note when enter and exit simulation mode please press down the RESET button of XL2000 LJMC S 51 single chip pin description 51 Series single chips like 8031 8051 and 89c51 89s51 are all adopting dual in line package DIP with 40Pins The following are specificati
42. cted to a back up power and make the RAM data inside the chip not lost HEBRE agit PIN30 ALE PROG when the CPU accesses external program ALE address latch used to latch the output of low bytes of the address When CPU accesses internal memory ALE will emit a pulse signal of 1 6 clock cycle This signal can be used to identify whether the CPU works or not and can also be used as an external clock output When writing EPROM RROG pin will be used as input programming pulse PIN29 when accessing external program memory this pin generates negative pulse selection signal PC s 16 bit data address will appear at the PO and P2 port External program memory will put instruction at port PO It is read by the CPU and executated PIN31 EA Vpp internal and external memory selection pin 8051 and 8751 single chip has built in 4KB code memory When EA is high and instruction address is less than 4KB CPU loads instruction from internal memory if instruction address is greater than 4KB CPU loads instruction from external code memory However when EA is low CPU always loads instruction from external memory regardless of address value Icon explanation beginning of each chapter Source program of experimentLine connect experiment Chapter VI of the single chip experiment with examples Limited by the space of this manual here we provide several typical c51 application examples To facilitate the novice to learn programming C
43. d toolbar Dynamic display of all the currentShort cuts for some menu item programming operation progress indicator of the programming Dynamic display of the current operation progress A Hardware installation Open the package of XL2000 insert the serial line 9 for 9 pin then plug the USB cable for 5V power supply Press down power switch and power indicator light is on Make sure the following is set up correctly e Jumpper JP14 JP13 is switched to RS232 end the other end is USB rogramming simulation button is in pop up programming state e CPU is AT89S52 at the cpu socket and the lock is fastened COM Port Setup COM Port Auto Detect Cancel E Here are the basic software operations Double click the XLISP icon on the desktop to start the program At this moment a serial port option box is popped up At this point if you are not sure which port you can use please hit auto detect button Or you can select the COM port as you decided By default you can select COM1 port For USB communication you may need to select COM3 or COM4 refer Chapter III for the specific USB installation guide In case of XLISP software unintended termination reopen the software hit the menu options serial auto detection it is very convenient 1 At this point if the serial port settings arez In order to simplify the steps the software correct then there will be the main interfacejsettings
44. definition of 0 and 1 are low to start the 0 56ms and the only difference is the width of the high O 0 56ms 1 for 1 68ms it must be based on the width of the high difference between 0 and 1 If 0 56ms from the lo level after the delayed start 0 56ms if read in the lower level on the bit to 0 the contrary is 1 in order to reliable sake have to delay more than 0 56 ms longer but no more than 1 12ms or if the 0 read the next is high so check 1 12ms 0 56 ms 2 0 84ms the most reliable General admission will be about 0 84ms The following experiments are based on the remote control button 1 16 the corresponding LED display 1 9 0 A B C D E F A Connection methods 1 connect PO port JP51 of CPU to digital tube data port JP5 with 8pin line 2 connect P2 port JP 52 of CPU to digital tube display port JP8 with 8pin line 3 connect P3 7 port JP53 of CPU to remote control input JP 45 with 1pin line org 00h i SXC ORG 0080H MOV R5 5 MOV P1 0FFH SNCH MOV P2 0FFH i JB P3 7 SB3 MOV P3 0FFH DINZ R5 SXC1 START JMP START JB P3 7 wait remote control signal i SB3 1 SB MO R5 250 MOV R4 8 high TTL is wrong in 8ms i SB3 2 SBA JNB P3 7 SB4 MOV R5 250 DJNZ R5 SB3 2 SBB DJNZ R4 SB3 1 JB P3 7 SXB1 JMP START DJNZ R5 SBB SB4 Ben
45. e RESET button A In simulation mode why the board cannot connect to my PC a Check if the simulation module in the package is locked well on the socket b Check if keil uv2 software version is OK Strongly suggest using the keil uv2 software in the package shipped to you Some other versions keil is not compatible Attention the keil software must be installed under the root of c disk which means CH Other directory does not work Refer to Chapter V XL2000 simulating operation guide The file must be named ascii and placed under ascii folder c Check if the COM port configuration is OK Because simulation and programming are both using COM ports when doing simulation other software that is using COM port must be closed d Check if programming simulation button state is OK down button means simulation VINNNN A AVANNAMAaNT Cvece A ry CH L GANT har Y la in I V CN lin C ANTIAN i AO m a r 7 2 XI2000 development system Shenzhen China Xuelin Electronics Co Ltd E 3 d Ni MM M O PA Why the simulation head works well with on board resources but does not work with external board a Check if the external board is reset well the oscillator is OK and the programming functionality is OK of the board b Check if the simulation head is plugged correctly The first PIN red must be connected to the first PIN of the CPU You can verify it with a multi meter B Why some program works under programming
46. eate HEX ile generate a hex file option so that Hex 6 Debug debug click on ile could be generated after assembling KeilMonitor 51 Driver at the same time select load the code to the emulator run to main0 and then click Set Target Setup A File Edit View Project Debug Flash Peripherals Tools SVCS Window Help Comm Fort Settings Cache Options ei Ge Mo e AK CH M Cache DATA SFR e a n s m lll Iw Cache ADATA lt EH Target 1 org 0000h am Execution with CH Source Group 1 ajmp start Cache CODE E 001 asm aan maw a amp nffth W Cache IDATA al Interrupt S Bu11ld target Mii E l DOREN IA 001 asm SP Sgram Size data 8 0 xdata 0 code b6 reating hex file from 558 U Errors our computer may be COM2 or other you are not sure this you can view Control Gees Panel hardware port communication portcompile Or press F7 After the success of o solve it At the same time pay attentionthe compilation you can see text like O o not run other software may occupy thelerror s 0 warning s as the red arrow COM_ resources Serial port debuggingshows At this time a hex file has been software must be closed else may causegenerated and we can burn it into a single chip conflict If you are using a USBwith ISP downloading Then we can do communication then please select thehardware simulation connect simulation irtual serial port number that allocated bymodule into on bo
47. er with parallel input serial output The serial port internal 80C51 works under mode 0 The parallel I O port could be extended by shift register chip The definition of pins A B C D E F G H parallel input GH serial output CLOCK clock input CLOCK INHIBIT clock disable High TTL is valid SHIFT LOAD shift and set control SER expand multiple 74LS165 connected by head tails 74LS165 pin definition 74LS165 logic table cos PARALLEL INPUTS SERIAL OUTPUT Internal Vcc INHIBIT D A INPUT Gu TA Clock Clock I Outputs Load Inhibit ea SHIFT CLOCK E F G H OUTPUT GND LOAD Du PARALLEL INPUTS VCC R33 R40 0 JJ 3 Lh P L b rs Connection methods 1 connect P3 0 P3 3 JP53 to inputs JP21 of 74LS165 with a 4pin cable 2 connect outputs JP28 of 74LS165 to 8way button switches JP48 with a 8pin cable 3 connect P1 port JP44 of CPU to 8way indicators JP32 Press down k00 k07 we can see d00 d07 are under control a z XI2000 development system Shenzhen China Xuelin Electronics Co Ltd 38 org 0080h delay mov r7 00h i loop mov scon 00010000b set MODE 0 tt mov r6 00h i clr p3 2 P3 2 0 to load data djnz r6 call delay1 i djnz r7 tt i setb p3 2 P3 2 1 to output ret i clr ri RI 0 i delay1 i loop1 jbc ri loop2 mov r7 02 jmp loop1 5 i djnz r7 i loop2 mov a sbuf ret mov p1 a output P1 i end i jmp loop restart Pen pm rm em r
48. experimental program in the CD L NExperiment 25 PS2 keyboard experiment Please refer to CD about how to programming with PS2 keyboard VCC JP81 1 2 3 4 5 PS2 experimental photo insert standard PC keyboard with PS2 interface into JP81 of XL2000 Insert all the jumper caps on JP41 Once you press down one key the characte will show on the LCD When doing othe PS2 Keyboard hardware schematics pin 3 cases without LCD please remove all the 6 PS2 Experiment 26 SD card SPI mode experiment SD card with full name as Secure Digital Memory Card has the advantage of lightweight encryption high speed transmission and good for handhold devices SD works under high speed and low speed modes therefore designed with two interfaces SD mode high speed and SPI interface low speed In the single chip application it often works with SPI interface Class0 basic command set like card identification CMD27 CSD register to write initialization Class5 Erase card orders CMDO Reset SD card CMD32 Erase set the starting block address CMD1 Reading OCR register CMD33 Set erase the termination of the address CMD9 Reading of the CSD register block CMD10 Reading CID register CMD38 Erase the chosen block CMD12 Stop reading when the multi block dataClass6 Write protection orders ransfer CMD28 Set to write the protection of the address CMD13 Reading Card_Status Register block Class2 Reader command CMD29 Erase the address
49. f 8155 part with 4pin line Pe 55 experiment routine 26way marqueen program with 8155 as IO extension org 00h A3 MOVX R1 A JMP MAIN CALL DELAY ORG 0050H DA MAIN DINZ R2 A3 MOV 08EH 02H XRAM MOV R1 03H PC address 03H 1 clr p3 5 8155 reset MOV R2 06H setb p3 5 MOV A OFEH 1 clr p3 5 A4 MOVX R1 A setb p3 4 8155 IO M 1 selection CALL DELAY mov r1 00h command state register OOH RLA mov a 0fh set command state register with DJNZ R2 A4 XI2000 development system Shenzhen China Xuelin Electronics Co Ltd P 50 PA PB PC as output movx r1 a a1 MOV R1 01H MOV R2 08H shift left 8 times MOV A 0FEH A2 MOVX R1 A CALL DELAY RLA i DJNZ R2 A2 MOV R1 02H PB address 02H MOV R2 08H MOV A 0FEH MOV R7 255 D1 MOV R6 255 D2 DJNZ R6 D2 DJNZ R7 D1 RET End SR Goes r m OJ O wl XI2000 development system Shenzhen China Xuelin Electronics Co Ltd 31 uExperiment 18 experiment for 24C02 storing boot number 24002 55 A Connection methods 1 connect PO port JP51 of CPU to data port JP5 of digital tube with 8pin line 2 connect P2 port JP 52 of CPU to display port JP8 of digital tube with 8pin line SURE 3 connect P3 6 P3 7 port JP53 of CPU to control end JP38 of 24C02 You will see the number plus 1 at each press of reset BAT AY BP BaP 3 5 18 MONASH HAS e www Dicht com AL 2000 running photos
50. g location only depend on the frequency and the number of the pulse signals It is not impacted by the load change The main characteristics of stepper motor 1 Stepper motor must be driven with pulse signals No pulse no move If asserted with proper pulse signal it will rotate with a fixed angle The speed is proportional with the frequency 2 This step motor is configured with 7 5 degree pulse Rotating one lap needs 48 pulses 3 Step motor has the advantage of rapid starting and stopping characters change pulse direction you can change the direction of rotation 4K7 4K7 4K 4K7 Ovce S__ULN2003 OO O O J GM K AA 74HC14 1010 XL2000 package adopts 12v stepping motor in order to the convenience of demonstration we provide it with a 5v power supply The reader can provide it with 12v The step motor is driven by uln2003 the port is P1 0 P1 3 Connection methods Connect step motor port JP31 to P1 0 P1 3 port with a 4pin line Reference program org 0080h loop mov R3 0FFh send 1 to 30h main INC R3 mov a R3 MOV DPTR TAB MOVC A A DPTR MOV P1 A send content to display mov r7 5 Icall delay Delay cjne a 06H main i limp loop Otherwise clear R3 ret TAB DB 03H 09H 0CH 06H stepper motor DELAY Delay procedures MOV R5 255 D3 MOV R2 25 D4 DJNZ R2 D4 DJNZ R5 D3 RET end dd N ID A A A A aa I ANTMTTANT C
51. he outputs are high TTL Once a key is pressed down the input line is low TTL we can read the corresponding port to know if any key is pressed down The following gives a specific example 5B RETR SEARS design www Dich com IO rlo gt IO al d Cd O O a Ka M 4 Lh Oh A e O T The purpose of the experiment show 0 1 2 A B C D E F on digital tube when corresponding key is down 8 Connection methods 1 connect matrix key JP50 to P1 port JP44 of the CPU 2 connect data port JP5 of digital tube to PO port JP51 of the CPU 3 connect display port JP8 of digital tube to P2 port JP52 of the CPU EJ Reference org 0000h EB IBPISINEXT pi ajmp main MOV A 0cH 1 org 0080h LK ADD A R4 main PUSH ACC mov dptr tab put tab at DPTR Kd LCALL DELAY2 i Icall key call matrix key detecting i LCALL KS program JNZ K4 move a a dptr load tab data to i POP ACC ACC RET mov p0 a move ACC to PO port NEXT CLR P2 1 open display on P2 INC R4 add 1 to column value lmp main display in a loop MOV A R2 KEY LCALL KS call key detecting JNBACC 7 KEY JNZ K1 if key is down continue RLA LCALL DELAY mo key down call MOV R2 A VINNNN A eau fe ANANTM ANT ove A ry CH L CN PN TZ har a la I INA M AG lin GNOT AN i NE XI2000 development system Shenzhen China Xuelin Electronics delay to remove shaking 180 AJMPK3 O AJMP KEY oer back to continue
52. hing wrong in the experiment you can get back here anytime to have a review CH Why my XL2000 programming package is always displaying the selected serial port does no exist please choose another one a Check if power is on and power indicator light is on b Check if programming simulation switch button is set at the correct state The button state must be on when do programming c Check if any other software occupies serial port such as other programmer debugger or keil uv2 simulation software The same serial port can only support one program at the same time else confliction exists d Check if serial port selection is OK You can open Control Panel System Hardware property serial ports and see the port number Make sure the selection is consistent with the allocation number e Check if the USB drive is installed correctly Refer to Chapter III USB Installation Guide f Check if USB RS232 jumper is OK if you use USB then JP13 JP14 must set to USB A Why XL2000 does not act after prompted with success programming and target board is running a Check if the chip on the board socket is 89551 Other chip does not work b Check if the serial port is connected correctly with pin lines The result can only be displayed on some experimental resources such as LCD LED This output resources should be connected to CPU output port by pin lines correctly c Check if the system is reset well You can have a try to press down th
53. imulation system 1 1 System XL2000 comprehensive experimental system shorts for XL2000 is a multi functional 8051 MCU development platform partly supporting AVR PIC family chips which is developed by Xuelin Electronic Co Shenzhen China The company has more than 10 years of experience on embedded system designing and manufacturing around 8051 MCU family chips XL2000 combines not only the peripheral hardware often seen on other similar product also ISP downloading wires MCU programmer debugger and simulator all in one board With the assistant of hundreds of short and real runnable C language programming examples you could learn the programming technology comprehensively in the shortest time It is especially suitable for beginners college students and embedded engineers In particular What are the features of XL2000 What can we do with it It is integrated more than 30 full opening hardware modules with powerful functionality You can configure and active them as you wish CP2102 All USB 12846 Chinese LCD 8 bit LED 8 bit digital tube display 89C2051 The core 1602 Character LCD 74L5165 Into a string 74SL47 LED decoding ADC 0804 Analog digital 93C46 EPROM 74ls138 Decoder A relay output Dac 0832 Digital Analog 24C02 Serial EPROM 74LS164 Into a string 8 DIP switches 16 16 Matrix switch Small alarm bell 74LS14 Reverse 4 button switch Single chip simulation Infra red remote control Stepping Motor NE555 Hardware DS1302
54. l The user s Resources own board AL2000 forms 2 Download chip WWVW 51C51 COM p Chapter V XL2000 simulation step guide 5 1 Overview The simulation functionality of XL2000 is implemented by the simulation module Through the cooperation with KEIL software we can support both for on board resources simulation but also can support simulation of external target board resource by 40PIN ISP downloading head e Simulation can be 89C51 89C52 89551 89552 89C58 microcontroller with 51 core and so on e Directly support KEIL C51 IDE simulation environment e USB RS 232 communication interface adaptive baud rate 4 8 Kbps 57 6 Kbps Especially for laptop users without any RS 232 interface e Monitor program takes up few resources if run at full soeed take up no resources e 63K program space inside the chip can be updated online at any time e Support single step breakpoint full speed variable reference RAM variables etc debugging e Support assembly C language and mixed source debugging e Simulation interface on board can be connected to any type of target board so as to achieve unlimited hardware simulation of the expansion Hardware installation first of all connect the 9 pin serial port plug into the PC serial port like COM1 Connect usb cable to PC as the power supply Insert the simulation chip not _at89s51 into the socket on board and fasten the socket Press down JP17 programming simulation butto
55. l use of the 89s52 they are totally compatible do not have to bother XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 19 Project Workspace Options or Target Target 1 Atmel AT DLR Memory Model Small variat varlables a Code Rom Size Large 64K program Operating system None Remove Group Source Group 1 and it s Files sc Include Dependencies S Click on in front of the Target IA Simulation part is using Mon51 protocol menu then Source Group 1 Source groupprior to use it project must be set as follows 1 right click to select Add files GroupiClick the Project the project menu In the Source Group 1 source documents to bedrop down menu click options for target 1 added into group 1 at this moment chooseclick Target the target enter the simulato he type of file for Asm select 001 then Add freguency 12MHz in the prompt box click OK Options for Target Target 1 Device Target Output Listing C51 Ap BL51 Locate BLS Locate BLEI Misc Debug Utilities Select Folder for Objects Name of Executable Keil Monitor D Driver fe Create Executable Assess e Load Application at Startup till main Le D 7 jw Debug Information lw Browse Information Initialization File M Create HES File HEX Format HEX 80 Restore Debug Session slo Create Library Aesss LIE Breakpoints PA Select output output Cr
56. m em rm mm zm rm zm rm m rm pm rm pm rm pm pm rm pm rm mm rm rm rm rm m ms A experiment 12 DAconversion and application of the principle of dac0832 DAC0832 is D A converter chip with 8 bit resolution fully compatible with the processor and it has the advantage of low cost simple interface and easy conversion control It is widely used in single chip system application 1 the pin and functionality of DAC0832 Dual In Line and DIO DI7 data input line TLL level small Outline Packages ILE latch data lines to allow input control signals HIGH is valid CS selection input line LOW is valid WR1 write selection input signal of input Vec he BYTE1 BYTE2 t w XFER d Input control line of data transmission DI LOW is valid W I WR2 write selection for DAC register lout1 current output line when all inputs are all 1 lout1 is largest lout2 current output lines the sum of its value and lout1 is a constant Rfb input signal feedback there is an internal feedback resistor in the chip Vcc power input 5 v 15 v Vref baseline voltage input 10v 10 v AGND analog ground for the analog signal and baseline voltage DGND digital ground Dia LSB VREF to DD n n a Eed m Inn C loun DAC0832 Experimental schematic U Ja bn P Ma LA Fi N Pe R31_4k7 R32 4k7 DACO832 design www Dicht com d XI2000 development system Shenzhen China Xueli
57. mega8535 ATmega8535L ATtiny12 ATtiny12L ATtiny13 ATtiny13L ATtiny15 ATtiny15L ATtiny22 ATtiny22L ATtiny26 ATtiny26L PIC Microcontroller Series PIC16F870 PIC16F871 PIC16F872 PIC16F873 PIC16F874 PIC16F876 PIC16F877 PIC16F873A PIC16F874A PIC16F876A PIC16F877A AT24CXX AT24C01 AT24C02 AT24C04 AT24C08 AT24C16 AT24C32 AT24C64 AT24C128 AT24C 256 AT24C512 amp Advantages of ISP download head on XL2000 1 If you design the product as an open or scalable system then you need to use this download line or other download line to upgrade the single chip 2 Upgrade software version before shipments Many products may need to fix various bugs before the delivery to the customer However the IC may have been weld to the o circuit board and can not be removed easily You can use this download head on XL2000 to update the software online with great convenience KA several ways to download with XL2000 ISP 1 Reserve downloading sockets on the target circuit board by this way we can download the software in the chip online 2 If you have not reserve any download socket for the download head and want to use XL2000 ISP in this case you can make a download head yourself with bare lines and weld it to the target board 4 2 Definition for XL2000 download head Read below table carefully and make sure you totally understand it before using 1 NC Vacant 2 NC Vacant 3 NC Vacant 4 BV 56 GND 6 NC Vacant 7 SCK SCL 8 MISO SEN WP 9
58. n and make the board work in simulation mode NOTE here it is run with serial port if by USB then insert the USB line at the same time make sure JP13 JP14 232 USB is switched to USB end If simulating on board resources first of all connect the pin lines to the related IO hardware port according to the experimental objective The simulation result will be shown directly on the XL2000 board If you need simulate a external target board connect the simulation head into the target Experiment cable board then the simulation result will be X12000 shown on the target board Keiluv2 exe debug software Please pay attention to the insertion direction Experimental Resources XL2000 forms 4 emulation own board WWW 51C51 COM ida N Le A A A A AIA I N V PW PN VNT CO Rm O M Trin a7 la e ka la N ka na M IIA Ir CU PN tv a a N NEO A A A 1 lt J XI2000 development system Shenzhen China Xuelin Electronics Co Lid LO gt H 4 J III L D VOLU v Wid e Software installation copy carom Tools keil to the root of the c disk PET Uve remove read only attribute of all files ATTENTION must be under c root directory Execute keil uv2 uv2 exe you can create a shortcut for uv2 exe as you wish Uv2 icon 5 2 Create your first project software operation guide SAH te Hite Tied te er CPU e Save in ze Local Disk C si da ci Eg Vendor Atmel Device ATS89C51 Use Extended Li
59. n Electronics Co Ltd B 40 reterence trapezoidal wave generated by DAC0832 ORG 0080h next i MAIN mov a 0 i ADD A 10 increase gradient of 19H MOV DPTR 07FFFH simp Ip MOV R1 0ah DELAY LP MOVX DPTR A address selection D2 MOV 31H 0FFH ACALL DELAY D1 DJNZ 31H D1 djnz r1 next RET simp main END A Connection methods 1 connect P3 6 JP53 of CPU to WR of DACOB832 JP 24 with 1pin line 2 connect P2 7 JP52 of CPU to CS of DAC0832 JP24 with 1pin line 3 connect PO JP51 of CPU to data input of of DACO832 JP27 with 8pin line 4 observe the converted signal at J2 by an oscilloscope Suggest adjust Y axis to 0 2V cell X axis to 1MS cell Experiment 13 A Dconverter ADCO804 The so called A D converter is the analog digital converter Analog to Digital Converter referred to as ADC whose functionality is to convert analog signals into digital signals WR 2 1 RD I3 R45 10K al 616 150 W1 10K R44 10K E 0 N U a dI IN gt N Q DI VG U Ma HA Fa R43 1K VEC c ADO8048R4 gt design www Dicht com ra IK O ADC0804 specifications and pin definitions CS chip select signal WR Used to start the conversion of control When VREF Auxiliary reference voltage WR from HI to LO the converters have been cleared when WR back to the HI the conversion starts RD external converter to read the results of the footDBO DB7 8 bit digital o
60. nected to P2 JP62 Column scan connect to 74LS154 XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 1 Chapter II Guick Start follow me to make XL2000 Marguee experiment 2 1 software installation Insert CD shipped with the package open the driver XLISP directory Double click the setup exe follow the prompts and click next button until the installation is complete If you get the remainder that system files are old probably you need restart your computer and continue the installation First of all le s use XL2000 over serial port to do a simple marquee experiment S i XLISP Welcome to www 51c51 com File F Edit E Programe P Option 0 Language L Type Setup Erase Blank Frite Verify Encrypt Auto Help 18 Load File OK Programmer Type TXU esi mr as RAN State ERR Bort coms Load File Start K Load Chip Class MCU Co ATMEL 51 Type A Memory 8192B OB Encrypt 3 Load File Load Fi OK File Code C Program Files XLISP 18led hex Load Fildtart Load File OK Load File Start SISCH Load File OK Code 5 Se 01 30 FF FF FF FF FF FF FF FF FF FF FF FF CR Auto Setup 100010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 100020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Load File 00030 75 90 00 12 00 4C 12 00 4C 12 00 4C 74 FE FS 90 SEN 100040 12 00 4C 12 00 4C 12 00 4C 23 01 3E TF 00 TE 00 Blank CM 100050 DE FE DF FA 22 FF FF FF FF FF FF FF FF FF z
61. nker LX51 instee Family MCS 51 a iboot DD WINDOWS Documents and Settings E bsmain_runtime log Keil Data base Description Program Files Ei 2051 based Full Static CMOS controller with Three Lev RavBin ET 49801 32 1 0 lines 2 Timers Counters 6 Interrupts sources Ga ATO7FSI AK Flash Memory 128 Bytes On chip RAM CITEDOWNLOAD I ATS7F51RC Eq AT87F52 d Eq 478901051 AT89C1051U File name G AT89C2051 AT89C4051 Save as type A Files 7 I AT89C52 9 AT89C55 AT83F51 v r JE create assembly source file Click FILE LP en file menu NEW new file to open a new en NE ac ext editor window at the blank part input one el Click Project the project menu Seleclexample program like marqueen LEDs And New Project In the File Name Enter yourthen click FILE file menu of SAVE Save irst name of the project let us assume it ascommand to save the file MUST save the file test Save the file with extension uv2 thiswith suffix asm for example c 001 asm is the KEIL uVision2 project file extension Note that do not save the file under some After that we can directly click the file to opendirectory with non ascii characters Bette he whole project save the file under some standard DOS Then pop up a dialog box it will let youdirectory at least 8 ascii char no space in it choose single chip models let s choose ATMEL AT89C51 Note that the actua
62. ns Port COM1 Communications Pork Ca Sei Printer Port sura PI Se E D Processors D Rae ens T Sound video and game controllers S E Disable E System aaa a sel o Ei Sounc Uninstall d W Syst K Bp 7 scan For hardware changes Figure 1 When PC configured with many usb P devices the available COM port maybeFigure 2 right button menu of the COM5 COM5 which is not supported by simulationdevice click properties menu item software such as KEIL Select lower Select higher Receive Buffer Transmit Buffer COM Port Number compatible LIAR h Dpmechon problems erformance Figure 3 enter the usb serial port com5 property click the port settings and then high level properties Choose a less often used COM port for example COM3 Device Manager Pie Action View Help u 66 3 S Sa IEEE 1394 Bus host controllers Keyboards E 0 Mice and other pointing devices f Monitors Network adapters lt 9 Ports COM amp LPT TEE s Communications Port COMI i Communications Port COMZ E F CP210x USE to UART Bridge Controller COM ow Printer Port LPT1 E g s Processors EI Sound video and game controllers H 14 System devices HTTP L lt T GT lt EAEE E G a Figure 4 System has allocated COMB for virtual usb serial port tips for USB COM port can not find when running XLISP software HF COM Port Setup COM Port CO
63. of this 8051 MCU You do not need to find other components and it should be very helpful for your development task 4 Perfect sample programming examples With more than 10 years of 8051 developing and designing we are offering programming examples for each hardware module on the board In addition to the sample code we are also providing step by step instructions principle pictures and connecting method We hope our effort could speed your learning and developing embedded system 5 USB communication connectors USB communication connectors could be used for ISP downloading and also power supplying It is not necessary to supply the board with an extra external power It facilitates the laptop users who have not LPT or COM port on his laptop The single wire connection makes it extremely simple and suit for debugging on the field 6 anti plug protection All plugs are designed to prevent wrong plug in With connection pictures and clear instructions it is convenient for your learning even if you are a beginner 7 More ISP downloading options You could choose either RS232 or USB for the communication between the development board and the host PC The communication is controlled by a separate 89C 2051 which removes the impact on the host PC OS and improves the stability The communication could be used as an independent ISP downloading interface for 51 AVR PIC family ships Also it could be used as an independent programming interface fo
64. onics Co Ltd a 24 z JP32 1 2 3 4 5 6 7 8 gt reference program omg 0000h start dr p1 5 i ajmp LOOP jump to LOOP label call delay org 0080h get to 0030h to reserve some space clr p1 6 i 3 LOOP i Icall delay i i mov p1 0ffh turn off all lights clr p1 7 i clrp1 0 turn on light at p1 0 Icall delay i Icall delay delay for a while AJMP LOOP jump to LOOP and restart to run i i clr p1 1 turnonlightatp1 1 delay mov r5 20 delay number i Icall delay i di mov r6 40 i leo d2 mov 17 248 i Icall delay dinz r7 i clr p1 3 djnz r6 d2 i Icall delay i djnz r5 d1 i i clr p1 4 ret i Icall delay i end Connection methods connect P1 port JP 44 of the CPU with eight way lights JP 32 with one 8PIN cable The connecting and program running photo like below 8 lights turn on off one by one Seal RRA ESI me Dich com XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 25 Experiment 2 Control Relay In the relay module a PNP three tube 2N5401 is used to drive the 5V relay The relay touch point is routed out by the JPOO terminal When the relay does not act the terminal is open When the relay is active the terminal is closed Leading the touch point out could control external device such as lanterns and so on It should be noted that control current should not exceed 1A the voltage should not exceed 120V If using the touch
65. ons of the 40pins chart Power and ground occupy two pins external quartz oscillator clock occupy another two pins total of 32 4 8bit I O ports occupy 32pins the interrupt port multiplexed with P3 port Next let us explain the functions of each pin one by one Pla d PIN20 ground Pi i PIN40 5 V power supply E 6 PIN19 XTAL1 clock on chip oscillation circuit input eee gt PIN18 XTAL2 clock on chip oscillation circuit output Kg 10 EL IYER 8051 can work in two clock mode one is the on chip Wipe 3 013 clock oscillation mode in this case PIN18 and PIN19 TPS need to be connected to an external quartz crystal Fi Ps 7 Hi 2 12MHz and oscillation capacitor The oscillation EE capacitor value takes 10p 30p Another mode is the GHD b external clock XTAL1 connected to ground external clock signal connected to XTAL2 Input and output I O pins PIN39 PIN32 mapped to P0 0 P0 7 I O port Ee PIN1 PIN8 mapped to P1 0 P1 7 I O port PIN21 PIN28 mapped to P2 0 P2 7 I O port S a PIN10 PIN17 mapped to P3 0 P3 7 I O port LI PIRPR FT A Z LART A Y PIN9 RESET Vpd reset signal When power on 8051 clock circuit starts to work and a high TTL of 24 clock cycles signal occurs on RESET pin By this way the system is reset and initialized The 8051 can be reset automatically and can also be manually see below In addition RESET Vpd is a multiplexed pin during the Vcc power down period this pin can be conne
66. p 5 EEPROM Get more chip type if update software Online update from www ec66 com and you will each step Programming is OK L XL SP Welcome to www 51c51 com File F Edit E Programe P Option O Language L iZ AP S B Open Save Type Setup Erase Blank dh Encrypt gt Verify P Write Erase staring Erase complete Programming starting Auto lalog box Look i Chip Type Serves ATB3551 po ATB3553 ATBIL553 AT8958252 ATBIL58252 5 My Recent Documents m E ga Si o u z sc o o o P v 5 o z T Z o V Cancel My Network Places 5 At this point click smart all in one button Attention see the progress bar O HorseRacel Ed 28LED HEX O8LED HEX Hex filer Hex v Open as read only File name Files of type Cancel In the process of programming ofoperation the LED indicator for programming programming instructions at the same time lis on after completing programming the LED in status report window you can see status ofwill be off This light as the programming State indicator is very important At this point programming completed procedures have been Next the hardware needs to be connected Program exiting and target board is running As this is a marquee case using 89s51 pick one of 8PIN line inse
67. point to control high voltage be careful RELA Input 8way marquee program above connect P1 0 of P1 port JP44 of the CPU to JP18 of relay part you can hear the sound of relay s open close Wired the terminal out you can control the extern lanterns The connect photo is like below SP i BEFA ZE www SleSl com XL2000 running photos n XI2000 development system Shenzhen China Xuelin Electronics Co Ltd g 26 NExperiment 3 8 way lights showing the status of 8 way DIP switch One end of 8 way DIP switch is connected to ground and the other side could be wired out through JP40 the related schema graph is like below JP40 SPOT ANATOM The purpose of the experiment by setting different DIP switch status and let the 8 way lights indicates the status of 8 way DIP switches By this way you can understand the concept of bits and data transfer in the single chip Reference program org 0000h Start ajmp loop org 0080h 0030h to the Department of between 00 30 to avoid sensitive Address loop MOV A PO I PO state switch read A MOV P1 A A data sent to the port P1 light JMP LOOP A fresh start END Ejight way DIP switches to JP40 with a 8PIN data cable into the CPU of the PO JP51 8PIN and then use a data cable to the CPU part of the P1 JP 44 connected to the eight way part of the light JP32 The result Data photo map corresponding to the switch to open corresponding to the bright
68. r 89551 52 etc chips 8 Equipped with 40pin simulator head It could be used as an independent simulator for 51 MCU With the help of KEIL software it supports on line debugging like single step execution break point and full run XI2000 development system Shenzhen China Xuelin Electronics Co Ltd wa 9 Unique intelligent single click design in software You can finish the erasing writing verification and running by a single click It is very helpful for the real programming and reducing the unnecessary debugging time For example by the verification step you are confident your code is really written into the chip So you can locate connection issue or logical issue in the code quickly when there is something wrong It is also suitable for international users with our offering of English software version It is specially equipped with a 3in 1 public plug which supports burning running and simulating It is convenient and not need to plug and unplug here and there A System requirements WINDOWS98 ME 2000 XP 2003 operation system if English OS must be configured with Chinese character set Minimum 50MB space in hard disk At least one USB port or RS232 serial port Step by step learning approach When you get this elegant experiment box please do not hurry power on the board we suggest you 1 Spend about 1 hour to read the manual carefully 2 Get familiar with various modules built in this experimental box especi
69. r your support Your name Your Address Your telephone Product Name XL2000 integrated simulation experiment instrument Date of purchase What do you think of our products And the appearance of the process O Well U General Bad System resources Strong 7 General 1 Weak Where should be improved for our products From what we know means choose O Dian zi Newspaper Radio n E World LI Search engine O Links to other sites U Afriend E market Your Education I Secondary or high school O Big or college H Graduate and above Your Occupation LI Students LU Teacher H Hardware Engineers H Software Engineer O Fans The average monthly income 1 1000 and the following 1 1000 3000 1 3000 5000 1 5000 10000 Your comments and suggestions about the product Shenzhen Xuelin Electronics Co Ltd China All rights reserved September 3 2008 Wednesday The third edition
70. rt bit RET CLR CLK CLK 0 TABLE DB OFEH 0FDH 0FBH 0F7H CALL DELAY Ad a light to the left MOV DPTR JPTBL46 DB OEFH ODFH OBFH 7FH JMP A DPT A value of the jump in END accordance with the relevant address AJMP SREAD Reading AJMP SWRITE Write AJMP Write enabled AJMP SEWDS Write to MOV A 80H Opcode to send 10 CALL SDATA MOV A ADR46 93C46 included in the SVSICITI S lieTIZTIETI oiid AUGIITI EIGGUOIHG a LU vn U LSexperiment 21 Two way serial communication experiments In simple applications only 3 lines could complete the communication namely the DIG pin RXD 3 pin TXD 5 pin GND The interface between serial communication and the CPU because serial communication specification defines 1 as 15V and 0 as 15V while for CPU 1 as 5V 0 as OV the conversion between them is needed The often seen conversion circuit is MAX232 Cum BEE LIRE SALI n II E A E E 247 HER px Bie Eeen T w s Us ES S sec 1x80 zeme SS i FFR 214800 isen DR zr Em Sep sen Sg x RTS reg IT Sos eh sk T Krs SE e L 3 NIN n z one as 0155 28794376 0 O 0 er io m After the following program is OK and burned into the CPU please close the burning functionality of XLISP software And then press down JP17 programming simulation to simulation mode Open sscomv20 serial port debugging tool in the CD select COM port
71. rt one end to the P1 port JP44 of CPU on XL2000 the Help SI Exit Programmer Type ISPro Hardware Hl LI Software 3 0 State DEI Port COMS Chip Class MCU Co ATMEL_51 Type AT89352 Memory 8192B OB Encrypt 3 File Code C Program Files XLISP 18led hex o1 02 HL 00070 00080 00090 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FR FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FMFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FP 1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Request Ispro Start Ispro State OK Lode File Reset Chip Auto Setup Load File os ClTY Boe nag rene R na QALY SAREI Welcome to www 51251 com P1 port of program is running successfully If it is not connection a Mia M IN A a A j J nunlanm ANT eve rnam Chan sh an CAL I A Aa M 11a I ven Linn Fran ina A sl A ef 111111 fA j ala LA K XI TJ 2 JA f 17 2 LA i A A 2 Fb 2 ANNUI gt lt A INTO L UU C CS V C L JI Gi L DIV L Gi WT IC I IILI Oil Will I a S N U V IL U L UU IO kel I VU sas L L N u WI J Chapter Ill of the U
72. s Q7 9 3 4 5 6 10 11 12 13 79 LS TL OOooooogo D CA Ch LH E Lal H ra c Connection methods 1 connect P3 0 P3 1 JP53 of CPU to inputs JP20 of 74L 5164 with a 2pin cable 2 connect outputs JP 26 of 74L 5164 to 8 way indicators JP 32 with a 8pin cable The following program 8 way marqueen through 74L 5164 rm rm rm rm rm rm rm bm rm rm Be Be Be rm Be rm rm rm rm rm BP rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm E rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm rm 2 rm rm rm rm 2 rm 2 e rm e rm rm rm 2 rm rm rm He org 00h DELAY jmp start MOV R5 255 i org 0080h D3 MOV R2 255 mov scon 00000000b set UART to MODEO D4 DJNZ R2 D4 start DJNZ R5 D3 i mov dptr table set data pointer to the TABLE i RET i loop clr a clear ACC i table db 01h 02h 04h 08h _ left shift move a a dptr get data from TABLE db 10h 20h 40h 80h cine a 03 a1 db 01h 02h 04h 08h i jmp start db 10h 20h 40h 80h a1 cpl a reverse the data i db 80h 40h 20h 10h right shift i mov 30h a store ACC at 30H db 08h 04h 02h 01h i mov sbuf 30h db 80h 40h 20h 10h loop jbc ti loop2 dp 08h 04h 02h 01h jmp loop 3 db 00h Offh 0Oh Offh i loop2 call delay i db 03h i inc dptr END jmp loop p LiNExperiment 11 74LS165 parallel in serial out 74L165 is a shift regist
73. should be checked at the first time of the following the status report on theFirst click Settings button in the toolbar ln operation of the window display the automatic programming options marked programmer detecting is OK he Erased write target board to run and 2 2 software If not OK please check if the COM portthen click OK In generally detecting chip settings are correct Power indicator light istype checking empty verification and written on The simulation programming mode is inencryption should not be marked it is a waste programming up state USB 232 jumper Isof your valuable programming learning time Switched to rs232 Z IXLISP Welcome to www 51c51 com File F Edit E Programe P Option O Language L i PX A Open Save Type Setup Erase Blank R ei d Verify Encrypt P Write Auto ka Auto Program Auto Program Load Fi Help SI Exit er Type ISPro Hardware 1 1 Software V3 0 State 0K Port COMS Programm Chip Class MCU Co ATMEL_51 Type AT89352 Memory 8192B OB Encrypt 3 File Code C Program Files XLISP 18led hex DOBOV 01 00010 000AD 75 90 00 12 00 4C 12 00 4C 12 00 4C 74 FE FS 90 u L 12 00 4 12 00 4 12 00 4 23 01 3E TF OO TE 00 LL DE FE DF FA 22 FF FF FF FF FF FF FF FF
74. single chip we can see the figure 2 is displayed on the digital tubes Maybe you feel it is too cumbersome to write a so long program and display only a figure 2 As we can see from above showing figure Z is equal to trun off tube C F and H Due to the common anode connection that means O low TTL is on and 1 is off From the most bit to least PO 7 P0 0 could be wrote as 01111110 the hex number is A2H We can compute this hex number before programming and store these data into a table After this we can call it to display the figure easily o Oo Oo 4 D nn pn 2H 100 o i H 1 4 4 NE 0O 7EH 9 1 3 0 4 oO 0 0 H 0 ASH 3 0 4 4 o 0 oo 4 0 62H 4 0 1 H 1 Oo 74H R Oi np n I D 6 ooo pi oO 9 9 BIH SE Do i 1 141 o e 1 i 0 Dan 8 oD H 0 nn o Oo 20H 9 u 100 0 0 oO 0 Oo 60H With this table the displaying of figure 2 could be simplified to st LOOP CLR P2 7 select the digital tube on the left side MOV PO O0A2H send the hex number of 2 to PO port JMP LOOP Jump and restart END running photos 1 connect data port JP5 of digital tube to PO port JP 51 of CPU 2 connect display port JP8 of digital tube to P2 port JP 52 of CPU XI2000 development system Shenzhen China Xuelin Electronics Co Ltd B 30 ORGOOOOH i MOV P0 74H i AJMP MAIN i LCALL DELAY i ORG 0080H MOV PO 0FFH i MAIN eem P24 i CLR P2 0 select 1 digital tube i CLR
75. sk display 0 1 2 3 by pressing K02 K03 KO4 KOB keys m r 4 org 0000h 1 limp 1 checking in loop 11 limp start 2 i I2 mov p0 28H display 0 12 org 0080h 3 limp 11 13 start mov p2 0ffh 4 D mov p0 7EH display 1 14 CLR P26 select most right digital tube 5 ljmp 11 15 i MOV p3 0ffh initialize P3 port 6 14 mov p0 0A2H display 2 16 Dn jnb p3 2 12 SE i limp 11 17 jnb p3 3 13 2 3 I5 mov p0 62H display 3 18 jnb p3 4 14 169 limp 11 19 jnb p3 5 I5 check key pressing 10 end 20 Le D e l gt LC Experiment 7 Matrix key recognition technology Matrix key part consists of 4 4 16 keys and it is connected to JP50 port The I O port connected by row lines are outputs and the I O port connected by column lines are inputs When no key is pressed down all t
76. steps initialization ROM operating commands and memory operating commands First DS18B20 needs to be started And then the temperature conversion value is read out This program is hooked only one chip using default 12bit conversion precision external power supply the high byte value of the temperature is sent to WDMSB low byte value to WDLSB Finally the actual temperature value is converted according to the temperature format circuit schematic of 18B20 package and pin definitions of 18B20 Running program and the digital tubes will show the current temperature In this system In order to simplify the program 74LS47 LED decoding and 74LS138 3 8 decoding are adopted That s to say P0 0 P0 1 P0 2 and P0 3 are connected to 74LS47 then the output are connected to data port JP5 of the digital tube P0 4 P0 6 are connected to 74LS138 and the output connected to bit control J8 of the digital tube Integrated system schematic Reference program DAT BIT P3 0 Communication WDLSB DATA 30H low temperature bytes WDMSB DATA 31H high temperature bytes ORG 0000H LJMP MAIN ORG 000BH SJMP TIMERO Show time Subroutine show from time to time the cycle of scanning show the buffer zone 40H 47H ORG 0040H TIMERO MOV PO 40H alue pO ORL PO 70H Finally a light CALL TIMS MOV P0 41H ORL PO 60H CALL TIMS MOV PO 42H ORL P0 50H CALL TIMS MOV PO 43H ORL PO 40H MOV T
77. stop and advertising screen XL2000 experimental instrument has a standard 16 16 dot matrix display of Chinese characters lts row scanning part is taken as PO P2 port and column scanning consists of 4 16 decoder with 74LS154 The circuit is as follows BG18 33 16 16 LED PING 8 F 6 5 4 3 2 1 NW BAD zl OO A Connection methods 1 connect PO port JP51 of CPU to JP55 of Chinese display with 8pin line 2 connect P2 port JP52 of CPU to JP54 of Chinese display with 8pin line 3 connect P1 0 P1 3 port JP44 to JP62 of Chinese display with 4pin line ORG 0080H TABLE START MOV A 0FFH db 01H 00H 02H 00H 04H 00H 1FH OFFH ff MOV PO A db 0E2H 00H 22H 00H 22H 0FCH 26H 88H ANL P2 00 i db 2AH 88H 0F2H 88H 2AH 0FAH 26H 01H MOV R2 200 D1 MOV R3 248 delay DJNZ R3 DJNZ R2 D1 MOV 20H 00H D MOV R1 100 L2 MOV R6 16 MOV R4 00H MOV RO 20H L3 MOV A R4 MOV P1 A INC R4 MOV A RO MOV DPTR TABLE MOVC A A DPTR MOV PO A INC RO MOV A RO MOV DPTR TABLE MOVC A A DPTR MOV P2 A INC RO MOV R3 02 D2 MOV R5 248 DJNZ R5 DJNZ R3 D2 MOV A 00H MOV PO A ANL P2 00H DJNZ R6 L3 DJNZ R1 L2 MOV 20H RO CJNE RO 0FFH L1 check if send complete JMP START db 63H 0FEH 26H 00H 02H 00H 00H 00H db 02H 01H 42H 01H 42H 02H 42H 04H K db 42H 08H 42H 30H 42H 0C0H 7FH 00H db 42H 0C0H 42H 30H 42H 08H 42H 04H db 0C2H 02H 46H 03H 02H 02H 00H 00H db 01H 00H 01H 00H 01H
78. utput control output signal INTR Interrupt request signal output low level AGND DGND Analog and digital signal grounding action CLK IN CLK R Then the clock input or oscillation VIN VIN Differential analog input voltage component R C about restrictions on the Single ended input voltage VIN grounding requency of 100KHz 1460KHz VCC power supply as a reference voltage of circuit e input and digital output relations for ADC0804 as shown in the table Binary code And the ratio of full scale he relative value of the electricity TT Four high byte Four low byte Four high voltage The four nal ll a ee ea mm fano fis e im B Ho 11 16 11 256 3 520 0 220 A 010 10 16 10 256 3 200 0 200 ADC0804 reference program define ADC PORT ad cs equ P3 6 ad wr equ P2 0 ad rd equ P3 7 ad input port egu p1 org 0000h ajmp main org 0080h main Icall adc demo ajmp main start AD conversion Adc_ Start clr ad cs nop clr ad wr nop setb ad wr nop setb ad cs nop ret Adc Read read converted signal mov ad_input_port 0ffh clr ad cs nop clr ad rd nop nop mov a AD INPUT PORT nop setb ad rd nop setb ad cs ret JJ show numbers read Adc_Demo Icall Adc Start Icall delay 1 ms Icall adc read clr p2 0 clr p2 3 mov p0 a ret delay1ms mov r7 10 tt1 mov r6 50 djnz r6 2US djnz r7 tt1 ret end Connection methods 1 connect P3 6 P3 7 port JP53 of CPU to input of A

Download Pdf Manuals

image

Related Search

Related Contents

GearBox 3 - Recording Setup Guide  Page 1 Page 2 危険有害性情報 注意書き アレルギー性皮膚反応を  Magazine n°55 du Grand Besançon  Samsung S24C770T Instrukcja obsługi  NuTone 772RBNT Instructions / Assembly  BA X-SNACK.doc  Manual do Proprietário  

Copyright © All rights reserved.
Failed to retrieve file