46911151820242729323538424751556468/73/7881879094526812I2C1620252832/3641D/A45D/A50A/D54A/D58626670757983869194966—MicroControllerUnit()INTELMCS-48MCS-5151MCS-51microcontrollersystem88INTEL/5187LPCW78DS87GSM97ATMEL89C51FlashROMFlashROM8031805189C51(,89C5189S5189S5289C52)8051518051,AVRPICAVRATMEL8RISC5151100000000085151AVRAVR--PICMICROCHIP8RISC515151MOTOROLAMC68HTIMSP430CSIEMENS5151DDWORDPROTEL7CPURAMROM89S5110----PLC128P2KEILC51KeilSoftwareMCS-51*16I2C24C01DS18B20DS1302T6963240*128MCS-511129MCS-51CPUROMRAM89C511VCC40+5V2VSS20GND3XTAL119XATL218XTL24PSEN29ROM5ALE/PROG30/EPROM----6RST/VPD9/7EA/VPP31/ROM309/108P039-32I/O9P11-8I/010P221-28I/011P310-17I/OIN/OUT/32I/OLEDLED1LED1P1.011LED11LED111CLRP1.01SETBP1.0—16—CLRP1.0;(☺)--CLRP1.0C2H,90HINTEL00—P1.01LED1SETBP1.0;LED1—————2189C51211ROMROM1ROMReadOnlyMemory1100001101100011011000000010010001101000101011001111000100110101011110011011110111121201BIT825688BYTE21(4)212348811111100011010245D7-D013D7-D0/312243825684888811111111000000008BUS16511614589C51FlashROMFlashROMROMROMROM--FlashROMPROMEPROMEEPROMPROMOTPEPROM—BIOSEEPROMFLASHFLASH----ROMRAMRandomAccessMemory—ROMRAM312ROM348256589C51ROM15ROMRAMLEDLED1LED1P1.0CLRP1.0SETBP1.01LED12LED12112LED11MAIN:SETBP1.0;LCALLDELAY;CLRP1.0;LCALLDELAY;LJMPMAIN;DELAY:MOVR7,#250;D1:MOVR6,#250;D2:DJNZR6,D2;DJNZR7,D1;RET;END.PDF*^*1.2.3.☺12342511LED1245LJMPMAINLJMP16LJMPMAINMAIN1MAIN5MAIN1MAINJIGUOCHINA☺24LCALLDELAYLCALLLCALL--DELAYDELAY6LCALLRETRETLCALL39RET26.7.8.910RET3P1.0LED146.7.8.9.105LJMPMAIN1P1.0LED1LED1DELAY6RETENDDELAYR7RAM123+456579123+456+789123+456579579+789=13681368579ROMROM—RAMR7RAMR7LED6MOVR7#250R7250250R7250R7R7250DBG8051MOVR7#01MOVR6#02F8/R6R701H02H250##250MOV17R7#250MOVR6#2508DJNZR6D2DJNZR6D2R6D2D2R61000250R609DJNZR7D1MOVR6#250R71DJNZR6#250250*250=62500MOVR6#250☺255LED1DJNZR6#250250*250=62500DBG80518051MON5151KEILC51MON51DBG805141234ROMRAM5RET6LCALLLJMPDJNZ7DBG805118DJNZR6#250250*250=625001ROM21212MT=1/f1/1212M12*1/121S89C514—INTELDJNZ2S12M62500*2S=125000S125mS0.125SLED1119MCS-51XTAL119XTAL21810-30PPCB2XTAL2XTAL163AX31C156S5123420I/O1LOOP:MOVP1,#0FFH;LCALLDELAY;MOVP1,#00H;LCALLDELAY;LJMPLOOP;DELAY:MOVR7,#250;D1:MOVR6,#250;D2:DJNZR6,D2;DJNZR7,D1;RET;END8LEDLED21SETBP1.0MOVP1#0FFH3CLRP1MOVP1#00H8LEDP1P1.7-P1.0MOVP1P1.7-P1.0LEDP1P0P2P32I/O1MAIN:MOVP3,#0FFH;LOOP:MOVA,P3;MOVP1,A;LJMPLOOP;END.11LED22LED24P3.2P3.3P3.4P3.51P3P3.7-P3.0MOVP3#0FFHP32MOVAP3MOVP3AAR73AP1421P3.2#0FFHAP1P1.2LED3P3.3-P3.5LED4-LED6LEDP2.0-P2.7P0.0-P0.7P3P89C5132SFRP0P1P2P31I/OCPU110Q0Q^11,1111I/O89C51P0P1P2P3P1P0P2P32221P0P0P021I/O1—//88P0/I/O/P0P12P1P0P1I/OP1P2P33P2P2I/OP08P016(851816)1664KP288I/OP04P3P3I/OP3P3.0RXDP3.1TXDP3.2INTO0P3.3INT11P3.4T00P3.5T11P3.6WRRAMP3.7RDRAMCPUCPUI/OI/OI/OI/ODATASHEET20mA1I/O20mA234N25PC814P1.0Q1VDDVCC,2I/O1A/250V10-P1.0SSRTTLCMOSI/O61P0P1P2P323D24MOVP3#0FFHP3LEDR7MOVR7#250#250#0FFH1DecimalNumber01234567895847=5*1000+8*100+4*10+7*11000100101012BinaryNumber011100=1*23+1*22+0*21+0*20010+0=01+0=0+1=11+1=100*0=01*0=0*1=01*1=13HexadecimalNumber0123456789ABCDEF#0FFH#--HBD0FFH0FFH=F*161+F*1602550A-F0#0FFH111011B1*23+0*22+1*21+1*20=8+2+1=11DFFH255D225053D53D=110101B253226121302612302110121616164440440441101011BD6HF0FH111100001111B000000100011200102300113401004501015601106701117810008910019101010A111011B121100C131101D141110E151111F161000010MOVR7#250MOVR7#OFFH#250#0FFH250DFFH#0FFH11111111255#0FFHP3P3.7-P3.0A-F026ROMRAM89C511R0M89C514KFLASHROM000H-FFFH15162*15161*15160=0-40954KROMROMROMRAM2RAM89C51128RAM00H-7FH00H-1FH4832R0-R7PWSRS0RS120H-2FH16RAM20H02FH7128RAM30H-7FH8089C5180H-FFHSFR89C51218128RAM89C51128RAMRAMDUG80517123RAM4ROM5100250100H4AHFFH6000100111111A0HFFH7100255001111001111010127R7R6P0P1P2P3RAMROMP0-P3CPUSFRMCS-511.ACCA2.BB3.PSWCPUCPU87D7D6D5D4D3D2D1D0CYACF0RS1RS00VP1CYMCS-518280-255255CY79H+87H01111001+01010111=1000000001CY2ACD3D4/AC=13F04RS1RS0RS1RS000000H-07H01108H-0FH10210H-17H11318H-1FH0-3RS1RS08R0-R7CPUPSW11H00010001RS1=1RS0=0210H-17HRO-R710H-17HDBG8051RAM10H-17H50V286PA1”P=1P=058H010110001P=14DPTRDPHDPL16RAMROM5SPRAM☺RAMINTELSPSP27H27H31H31H30H30H29H29H28H28H27H27H26H26H25H25H24HSP24HMCS-51☺27H28H27H6PCONPCONSFR81A234PSW29110000HCPU2RST92412M331CRTS1ms2R1SA3X25045,MAX813L304PC0000HACC00HB00HPSW00HSP07HDPTR0000HP0-P3FFHTMOD00000000BTCON0X000000BTL000HTH000HTL100HTH100HSCON00HSBUFPCON0XXX0000B2PC=00000000HLED0000HLJMPSTART3—PCON8MSBSBSMOD------GF1GF0PDIDLSMODGF11GF00PDPD=1IDLIDL=1PDIDL11PCONIDL=1CPURAMSPPCPSWACC24mA3.7mARETI231PCONPD=1RAM2V50uA1mS451OTP9123432ROMMOVR7#250MOVP1#0FFHMOVR7P1#0FFH()MAINSETBP1.0MAINSETBP1.01MOV30H#255LCALLDELAYLCALLDELAY2CLRP1.0CLRP1.0MOV30H,#200LCALLDELAYLCALLDELAYAJMPMAINAJMPMAINDELAYMOVR7#250DELAYMOVR730HD1MOVR6#250D1MOVR6#250D2DJNZR6D2D2DJNZR6D2DJNZR7D1DJNZR7D1RETRETENDENDLED125mS)125mS100mS30HR730H30H30HR7630H#MOVR7#250250#0R0RAM00HMOVA00HMOVAR000HA12211E5H00H2E8h12M11000110000001S3330H20A30HMOVA30H31HMOVA31H20202020020002002000?30H30H31H31H1MOVR7#201MOVR0#30H2LOOPMO