【正文】
oller and offer ample scope. Throughout the development process of SCM, you can indicate the development trend of Microcontroller broadly include:Lowpower CMOSbased MCS51 series of 8031 power consumption up to the launch of 630mW, while the microcontroller is now generally in the 100mW or so, with the increasing demands for lowpower microcontroller, the current microcontroller manufacturers have adopted the basic CMOS (plementary metal oxide semiconductor process). As the 80C51 on the use of the HMOS (high density metaloxide semiconductor process), and CHMOS (highdensity plementary metaloxide semiconductor process). Although CMOS low power consumption, but because of their physical characteristics to determine their pace of work is not high enough, while the CHMOS are equipped with high speed and low power consumption characteristics, these characteristics more suitable for low power in demand as the batterypowered applications . Therefore, this process will be the SCM development in the ing period the main technology is now the conventional microcontrollers are generally in the central processing unit (CPU), random access data storage (RAM), readonly program memory (ROM), parallel and serial munication interfaces, interrupt system, timing circuits and clock circuit integrated in a single chip, enhanced integrated microcontroller, such as A / D converter, PMW (pulsewidth modulation circuit), WDT (watchdog), some microcontrollers will be LCD (LCD) driver circuit are integrated in a single the chip, so that the unit MCU contains circuitry even more, while the more powerful features. Even SCM vendors can also be tailored according to the user39。s requirements, to create a microcontroller chip with its own addition, the product is now the universal demand small size, light weight, which requires strong function microcontroller and low power consumption, in addition, it also requested its size is smaller. Many microcontrollers now have a very wide range of package forms, which SMD (surface mount) is increasingly popular, making singlechip puter system is moving from the miniaturization of direction.While the MCU is now a wide variety, with different features, but still 80C51 microcontroller core mainstream though, is patible with its structure and instruction are PHILIPS pany39。s products, ATMEL pany39。s products and China Taiwan39。s Winbond series of microcontrollers. Therefore, as the core C8051 MCU half occupied. The Microchip39。s PIC reduced instruction set also has a strong momentum of development, China Taiwan39。s HOLTEK growing panies in recent years, microputer production, and its lowcost advantages of high quality, occupy a certain market share. In addition, there MOTOROLA pany39。s products, several large panies in Japan dedicated microcontroller. In a certain period of time, this situation will be able to continue, there will not be a monopoly of world domination by SCM is taking the plementary and interdependent and mutually reinforcing, and mon development path.附錄3 C程序includedefine uint unsigned intdefine uchar unsigned chardefine DATA_LED P1define DATA_0832 P0sbit LED1=P3^4。sbit LED2=P3^5。sbit LED3=P3^6。sbit LED4=P3^7。sbit JIA1=P2^4。sbit JIAN1=P2^5。sbit SENT=P2^6。sbit OK=P2^7。void mdleay(uint Delaytime)。void SHUJU(void)。uchar data a=0,b=1,c=2,d=6,n=0,flag。float data VCC=。void mdleay(uint Delaytime){uint j=0。for(j=0。Delaytime0。Delaytime){for(j=0。j130。j++){。}}} //延時1ms子程序void innt0() interrupt 0 using 1{uchar key。mdleay(5)。key=P2amp。0xf0。switch(key){case(0xe0):if(n==1){if(a==9)a=9。elsea++。}if(n==2){if(b==9)b=9。elseb++。}if(n==3){if(c==9)c=9。elsec++。}if(n==4){if(d==9)d=9。elsed++。}if(n==10){ if(c==9){c=0。if(b==9){ b=0。if(a==9)a=0。elsea=a+1。}elseb=b+1。}elsec=c+1。VCC=10*a+b+*c+*d。if(VCC){VCC=10。a=1。b=0。c=d=0。}if(VCC){VCC=。a=0。b=1。c=2。d=6。}VCC=()/。(int)VCC。DATA_0832=VCC。}break。case(0xd0):if(n==1){if(a==0)a=0。elsea。}if(n==2){if(b==0)b=0。elseb。}if(n==3){if(c==0)c=0。elsec。}if(n==4){if(d==0)d=0。elsed。}if(n==10){ if(c==0){c=9。if(b==0){b=9。if(a==0)a=0。elsea=a1。}elseb=b1。}elsec=c1。VCC=10*a+b+*c+*d。if(VCC){VCC=10。a=1。b=0。c=d=0。}if(VCC){VCC=。a=0。b=1。c=2。d=6。}VCC=()/。(int)VCC。DATA_0832=VCC。}break。case(0xb0):if(n==4)n=1。elsen++。if(flag==1){flag=0。a=0。b=1。c=2。d=6。DATA_0832=0x00。n++。}break。case(0x70):n=0。flag=1。VCC=10*a+b+*c+*d。if(VCC){VCC=10。a=1。b=0。c=d=0。}if(VCC){VCC=。a=0。b=1。c=2。d=6。}VCC=()/。(int)VCC。DATA_0832=VCC。n=0。break。default: break。}}main(){ucharTab[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E}。DATA_0832=0。DATA_LED =0x01。EA=1。EX0=1。IT0=1。n=0。flag=0。while(1){LED1=1。LED2=0。LED3=0。LED4=0。DATA_LED=Tab[a]。mdleay(5)。LED1=0。LED2=1。LED3=0。LED4=0。DATA_LED=Tab[b]amp。0x7f。mdleay(5)。LED1=0。LED2=0。LED3=1。LED4=0。DATA_LED=Tab[c]。mdleay(5)。LED1=0。LED2=0。LED3=0。LED4=1。DATA_LED=Tab[d]。mdleay(5)。LED4=0。}}附錄4 整機原理圖附錄5 元器件表序號名稱代號型號數(shù)量1單片機U2AT89S5112數(shù)碼管LEDSM41056413D/AU20DAC083214上拉電阻RP19A103J15電阻R1 R320026電阻R4 R540027變阻器RV110K18變阻器RV250019與門AND_474LS21110電容器C11000u111電容器C2220u112電容器C3 C4 C5100u313電容器C6 C7 C8104314二極管VD1IN4148115放大器U3 U6LM324116穩(wěn)壓U1LM317117整流橋BR12A118按鍵S1~S4復位按鍵419穩(wěn)壓管S17812120穩(wěn)壓管S27909121穩(wěn)壓管S37805122變壓器TR1雙15