【正文】
ng antiinterference ability, low cost, and this is, and offline puter (such as home PC), the main difference. Single chip MCU is through running, and can be modified. Through different procedures to achieve different functions, in particular special unique features, this is another device much effort needs to be done, some are great efforts are very difficult to achieve. A not very plex functions if the 5039。s CD4000 series of these pure hardware buttoned, then the circuit must be a large PCB board! But if the United States if the 7039。s hard drive in terms of nothing but speaking for the MCU is not acceptable. SCM in the utilization of hardware resources to be very high for the job so although the original is still in the pilation of a lot of use. The same token, if the giant puter operating system and applications run up get home PC, home PC, also bear not work. Can be said that the twentieth century across the three power era, that is, the age of electricity, the electronic age and has entered into the puter age. However, this puter, usually refers to the personal puter, referred to as PC. It consists of the host, keyboard, monitor and other ponents. Another type of puter, most people do not know how. This puter is to give all kinds of machinery, intelligent single chip (also known as microcontroller). As the name suggests, this puter system took only a minimal integrated circuit, can be a simple operation and control. Because it is small, usually in the charged with possession of mechanical stomach in. It is in the device, like the human brain plays a role, it goes wrong, the whole plant was paralyzed. Now, this microcontroller has been very widely used in the field, such as smart meters, realtime industrial control, munications equipment, navigation systems, and household appliances. Once all kinds of products were using SCM, can serve to upgrade the effectiveness of products, often in the product name preceded by the adjective intelligent, such as intelligent washing machines. Now some technical personnel of factories or other amateur electronics developers to engage in out of certain products, not the circuit is too plicated, that function is too simple and can easily be copied. The reason may be stuck in the product did not use a microcontroller or other programmable logic device.附錄3 匯編程序(1)主程序READ EQU 0WRITE EQU 2EWEN EQU 4EWDS EQU 6FLG0 REG 08HCS REG CLK REG DI REG DO REG ADR46 REG 20H ORG 00H MOV SP, 60H MOV R7, 00H DJNZ R7, $ MOV P3, 10H MOV ADR46, 00H MOV A, READ CALL TO9346 MOV 3EH, 3CH MOV A, 3EH CJNE A, 01H, A2 SETB FLG0 MOV R2, 03H MOV R0, 35H MOV ADR46, 01A1: MOV A, READ CALL TO9346 MOV R0, 3CH DEC R0 MOV R0, 3DH DEC R0 INC ADR46 DJNZ R2, A1 JMP STARTA2: CLR FLG0 MOV R7, 10H MOV R6, 06 MOV R1, 35HL1: MOV A, R7 MOV DPTR, TABLE MOVC A, A+DPTR MOV R1, A DEC R1 INC R7 DJNZ R6, L1START: ORL P2, 0FFH MOV R4, 06 MOV R0, 36HCLEAR: MOV R0, 00H INC R0 DJNZ R4, CLEARL2: MOV R3, 0F7H MOV R1, 0L3: MOV A, R3 MOV P1, A MOV A, P1 MOV R4, A CLR C CPL C MOV R5, 04HL4: RLC A JNC KEYIN INC R1 MOV A, R3 CLR C CPL C RRC A MOV R3, A JC L3 JMP L2(2)鍵盤掃描與識(shí)別程序 KEYIN: MOV A, R1 XRL A, 0EH JZ X4 MOV A, R1 MOV A, 0FH JZ X3 MOV R7, 10 D1: MOV R6, 248 DJNZ R6, $ DJNZ R7, D1D2: MOV A, P1 XRL A,R4 JZ D2 MOV A, R1 MOV DPTR, TABLE MOVC A, A+DPTR MOV R7, A XRL A, 0AH JZ SET0 MOV A, R7 XRL A, 0BH JZ START MOV A, R7 XRL A, 0CH JZ L2 MOV A, R7 XRL A, 0DH JZ L2 MOV A, R7 XCH A, 36H XCH A, 37H XCH A, 38H XCH A, 39H XCH A, 3AH XCH A, 3BH CALL DISP JMP L2X3: JMP DISP2 X4: JMP COMP(3)數(shù)碼顯示電路DISP: MOV R0, 3BHDISP1: MOV A, R0 ADD A, 50H MOV P0, A CALL DELAY DEC R0 MOV A, R0 ADD A, 40H MOV P0, A CALL DELAY DEC R0 MOV A, R0 ADD A, 30H MOV P0, A CALL DELAY DEC R0 MOV A, R0 ADD A, 20H MOV P0, A CALL DELAY DEC R0 MOV A, R0 ADD A, 10H MOV P0, A CALL DELAY