1/242013A1201+1000001-4823CPUCPU4EACPU589C5266RAM7C51sfrC518MOV20H#20H9T128T00510SM2=11EPROM27C25632K12138155A1/201201ARAMBROMCDCPU20,AP3.2BP3.3CP3.4DP3.53MCS51CPUA0B1C0D14ADC0809ADA48B88C412D8122/245AABRiCPCDDPTR6ATMODBSBUFCSCONDDPTR7MCS-511T0IEA98HB86HC22HDA2H8P1404AORLP1,#0FHBORLP1,#F0HCANLP1,#F0HDANLP1,#0FH91R1A00HB01HC08HD09H10ATMODBPCONCSCONDTCON11MCS-5112MHzMULABsA1B2C4D812T2A000BHB0000HC001BHD002BH13MCS51P1A00HB0FFHC7FHD80H14POPPSWAPSWBPSWCPSWDPSW15ABC=D!=16a=0x7fb=a2bA7FHB0F7HC0CFHD0FCH17SPA00HB07HC7FHD80H18void3/24ABCD19MCS-51A1B4C8D1620T01ATF1BTF0CTIDRI4520151CPU2RAMFLAGFLAG02K_DK_P3CPUT0TF04SBUF99HSBUF(210)12MHz,T1160msT02200s0xvoidinit_t0_1(){TH0=0xTL0=0xTH1=0xTL1=0xTMOD=0xTR0=1TR1=1}104/24P3.689C52+5VKT+5VP3.2/(INT0)#includereg52.h#defineucharunsignedchar#defineuintunsignedintsbitBEEP=voidinit1(){EA=EX0=IT0=0}voidint0()interrupt{uintiBEEP=for(i=300i0i--)BEEP=1for(i=300i0i--)}main(){init1()for()}2089C5274LS3736116RAM1822P21RAM4374LS3733435/24ALEP0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7P2.0P2.1P2.2P2.7RDWR89C52D1D2D3D4D5D6D7D0Q1Q2Q3Q4Q5Q6Q7Q0GOEA0A1A2A3A4A5A6A7A8A9A10OEWECE74LS3736116RAMO0O1O2O3O4O5O6O712010100000141H11111100FCH2345426MOVCMOVX71289TH1TL0100111512PCON13142012015BCABC610BBDDC1115CDBBC1620DBCCB452015142CPUPSWRS1RS032unsignedcharbdataFLAG(2)sbitK_D=FLAG^0sbitK_P=FLAG^22333241SBUF2SBUF2(220)0x38(2)0x38(2)0x15(2)0xa0(2)0x12(2)10P3.^6(2)1(2)1(2)0(2)0(2)2016/24ALEP0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7P2.0P2.1P2.2P2.7RDWR89C52D1D2D3D4D5D6D7D0Q1Q2Q3Q4Q5Q6Q7Q0GOEA0A1A2A3A4A5A6A7A8A9A10OEWECE74LS3736116RAMO0O1O2O3O4O5O6O782261167800H7FFFH438P083432013B1201ALUCU283MOVA@R024AT89S515MCS-51FFH6MCS-51RSTPC78C51intiCountsiCounts9MCS-5111P0107/24A-AB-BBC-C-CD-D-DA,A-DA-D-CD-C-BC-1112T03T0/T1201201C51AunsignedcharchData=0BstaticunsignedcharchData=0CsfrunsignedcharchData=0DstaticvolatilecharchData=02smallAidataBcodeCpdataDxdata3MCS-51PUSHACCSPABCD4MCS-51A5VB12VC24VD22V5MCS-51fosc6MHz1A1msB2msC1sD2s6HERESJMPHEREA1BC1D7AMOVBMOVXCMOVCDPOP81/A4B8C13D169LED1A0x3fB0x06C0xc0D0xf910LEDA0.7VB1.2-1.8VC3.3VD5V11P2I/O8/24ABC8D812T1A0B1C2D313CPUABT0CT1D014AbitBbyteCwordD1574LS164ABCD16ABCD17ADTLC549AB17sCD188155A1B256RAMC24I/OD1911.0592MHzT1T1A0xfbB0xfcC0xfdD0xfe20LEDPWMLEDABCD452019/242fosc12MHzT023C512000HFFH48LED50Hz1LED210201P18LED#include#includeintrins.h#defineucharvoidDelayMS(uintx){uchariwhile(x--){for(i=120i0i--)}}voidmain(){P1=while(1){=_crol_(P1,1)DelayMS(150)}}211.0592MHz89600voidinitSerial(){TMOD=TH1=0xfd10/24TL1=SCON=ET0=1=1EA=1TR1=}20174LS1648LED13274LS16443DINADINBCLR328LED101201CPU2-128,1273440PSEN580H60000H720-33pF8910B-AB11128201201~5CACAD6~10ABDBB10~15DDAAD16~20BCCCD11/2455251CRST2RSTRSTCPU2RST2412fosc=12MHz12/12=1Mhz,1us2T02828*1us=256us33#includeabsacc.h(1)#defineP8155XBYTE[0x2000]//(2)P8155=0xff//2#includeabsacc.h(1)XBYTE[0x2000]=0xff//4*((unsignedcharxdata*)0x2000)=0xff//(5)4T=1/50=20ms2,LED20/8=2.5ms3(21020)1reg52.h,(2)unsignedchar,(2)0xfe,(3)P1(3)20x20(2)0xfd(2)0x50(2)ES(2)1(2)2011lED10ma200200-1K32DINADINB1CLKQ0Q743DINADINBCLR32#includereg51.h#defineucharunsignedcharsbitSCL=P1^0sbitSDA=P1^1sbitDINB=P1^2sbitCLR=P1^3//3voidso164(ucharchData){uchari,x12/24SCL=0x=chDatafor(i=0i8i++){SDA=0if((x&0x01==1))SDA=1SCL=1x=x1SCL=0}}4voidmain(){ucharx=0x55DINB=1CLR=1so164(x)while(1)}//main32012A1201+1000110B-0110011B2MCS-51RAM3MCS-514MCS-51PC526MCS-517pdata(Ri/DPTR)8C51unsignedchartemptemp912MHz0210MCS-511112MCS-5112MHzNOPus13/24130GATE0TR0=14ROM27640000H151151unsignedcharbdataFLAG,A8BCDRAM20H~2FH2MCS-51,4I/OAP0P2BP0CP2P3DP23ARDBWRCPSENDALE4.0R0A00HB07HC08HD0FH5ABCD6a404Aa=a&0x0FBa=a&0xF0Ca=a|0x0FDa=a|0xF07unsignedcharx[5],*pb()Apb=xBpb=x++C*pb=&xD*pb=*x[0]864KAxdataBidataCcodeDbdata911AET0BEACESDST210APOPPSWBPOPAccCRETDRETI112712816k*8bitROMA8B13C14D1612Ainta[5]={0,1,2,3,4,5}Bchara[]={0,1,2,3,4,5}14/24Cchara={A,B,C}Dinta[5]=012313Areg51.hBabsacc.hCintrins.hDstartup.h1474LS373ABCD15A10AB40AC10mAD40mA552512MCS-511683C514LEDR51RAMi264KRAMx(10)160unsignedintFlagunsignedintInt0(unsignedcharpara)interrupt1{Cnt++15/24if(Cnt10){Cnt=0Flag=1}}2PSW414MOVA,#10101110BADDA,#01111101BCyAcOVP10MCS-5112MHzT0150msP1.0120PB0PB1PB2PB3PB4PB5PB6PB7PA5PA4PA3PA2PA1PA0AD0|AD7ALEWRRDIO/MRESETVssVccCE5V8155ALEP0WRRDP2.089C527407100*88.LED*65VCOM0COM5COM1COM3COM2COM45V6LED1216/242LED23#defineCOM_8155PBYTE[0x00]#definePA_8155PBYTE[]2#definePA_8155PBYTE[]2481558155init_8155(){P2_0=2COM_8155=2}5ucharcodeSEG_TAB[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x40,0x73,0x1c,0}ucharcodeBIT_TAB[]={1,2,4,8,,0x20}(2)sbitP2_0=P2^0ucharIDR_BUF[6]={1,2,3,4,5,6}LED_Disp(){uchara,iuintxfor(i=0i6i++){a=DIR_BUF[i]P2_0=(2)17/24PB_8155=(2)PA_8155=(2)for(x=500x0x--)}}120101000110B11001101B220H,2FH340000H56664K0000H~FFFFH7Ri819256s1011256121131148K1FFFH151151~5BBCAD6~10AACBD11~15CBBAC55251MCS-5112251PSENWRRD300003H0000BH10013H1000BH0023H4R=(VCC-VF-VCES)/IFVCC=5VVF=1.8V1.2~2.5VVCES=0.2V(0.1~0.2V)IF=15mA(10~20mA)R=20051unsignedchardatai(2)charintxdatax(10)16unsignedintInt0(unsignedcharpara)interrupt1unsigned