ܼɶƣƬڴ洢Сһ8λƬROMС8/16KֽڣRAMС256ֽڣⲿչͨROMRAMɷֱչ64Kֽڡ
ڿɿԺáоƬǰҵػҪƵģ俹ҵһͨCPUָ̻ROMвƻźͨһоƬڣʿɿԸߡ
չƬھмIJоƬⲿչõС/ܽţɸֹģļӦϵͳ
ܿƹǿΪ㹤ҵҪһ㵥Ƭָϵͳомḻ֧תָI/OڵԼλܡһ˵ƬƹܼٶȾͬһε
һ㵥ƬسϵͳͨùֻûԺõӦóҲʼƬڹ̻BASICͳĵƬ
2Ƭķչ
ڵƬص㣬ڹҵơݲɼDZܻ豸ּõõ㷺ӦáӹˮƽߣʮƬͼ˷ٵķչ·չģ
ٸĽɵ·칤գоƬĹٶȣѹͽģ ڱͬCPUϵṹװã첽пڣʱȣһõָϵͳĻϣݲͬӦѲͬװüɵоƬڣͬһڷͺŵĵƬڵƬӦУɿҪأΪƬӦ÷ΧߵƬĿɿһЧƬڵƬϲ˸߿ɿԵ¼Ҫһ¼㣺
a)EFT(Electrical Fast Transient) b) c)õƵʱӡ
֮ƬĿǰķչ£ֳƣ
a)ɿԼӦˮƽԽԽߣinternetһԵ b)ɵIJԽԽࣻ c)ԽԽͣ
d)ģ·ԽԽࡣ 3Ƭѡ
ٱϵͳõƬΪƺġƬ/MCUҪ51ͺ52ǿ֮ͣ52ͱ51ܸΪǿROMRAM洢ռ5251ָϵͳڱϵͳݵҪۺϿǺѡƬATME˾AT89C52ΪƺģҪڿAT89C52һ͵ѹCMOS 8λƬƬں8k bytesĿɷдFlashֻ洢256 bytesȡݴ洢RAM6жԴʱƵ024MHzøܶȡʧԴ洢ݱMCS-51ָϵͳǿ
AT89C52
AT89C52ATMEL˾ĵ͵ѹCMOS 8λƬƬں8K bytesĿɷдֻ洢(PEROM)256K bytesȡݴ洢ATMEL˾ĸܶȣʧԴ洢MCS-51ָϵͳ8052ƷżݣƬͨ8λ봦FLASH洢ԪǿAT89C52ƬʺΪӿӦóϡ
Ҫܲ
? MCS-51Ʒָȫ ? 8KֽڿزдFLASH洢 ? 1000д/ѭ ? ʱƵʣ0Hz24MHz ? ܴ洢 ? 256ֽڲRAM ? 32ɱI/O ? 316λʱ/ ? 6жԴ
? ɱ̴UARTͨ ͼ2-2 ͼ
? ĵĿк͵ģʽ ? Ƭʱӵ·
AT89C5240ţ32ⲿ˫/I/O˿ڣͬʱں2жϿڣ316λɱ̶ʱ2ȫ˫ͨſڣ2дߣƬʱӵ·ͼ2-2AT89C52ճ淽б̣Ҳ̡߱ͬʱAT89C52ɽ0Hzľ̬֧ѡĽڵ繤ģʽзʽֹͣCPUĹRAMʱ/ͨſڼжϵͳ緽ʽRAMеݣֹֹͣвֱһӲλ佫ͨõFlash洢һرǿɷдFlash洢ЧؽͿAT89C52PDIPPQFP/TQFPPLCCַװʽӦͬƷ
AT89C52Źܣ a)VccԴѹ b)GNDء
c)P0ڣP0һ8λ©·˫I/OڣҲַ/߸ÿڡΪʱÿλյķʽ8TTLŵ·Զ˿P0д1ʱΪ迹á
ڷⲿݴ洢洢ʱ߷ʱתַ8λ߸ãڷڲ衣
FlashʱP0ڽָֽڣڳУʱָֽڣУʱҪ衣
d)P1ڣP1һڲ8λ˫I/OڣP1弶ջ4TTLŵ·Զ˿д1ͨڲѶ˿ߵƽʱڡʹʱΪڲ裬ijűⲿźʱһIIL
AT89C51֮ͬǣP1.0P1.1ɷֱΪʱ/2ⲿ루P1.0/T2(P1.1/T2EX)μ2-1
Flash̺ͳУڼ䣬P1յ8λַ2-1Ϊ P1.0P1.1ĵڶ
2-1 P1.0P1.1ĵڶ
ź P1.0 P1.1 T2ʱ\\2ⲿ룩ʱ T2EXʱ\\2\\װشͷƣ e)P2ڣP2һڲ8λ˫I/OڣP2弶ջ4TTLŵ·Զ˿P2д1ͨڲѶ˿ߵƽͬʱڣʹʱΪڲ裬ijűⲿźʱһTTL
ڷⲿ洢16λַⲿݴ洢ִMOV@DPTRָʱP2ͳ8λַݡڷ8λַⲿݴ洢ִMOV@RIָʱP2P2ݡ
Flash̻УʱP2ոλַһЩźš
f)P3ڣP3ʱһڲ8λ˫I/OڡP3弶ջ4TTLŵ·P3д롰1ʱDZڲ߲Ϊ˿ڡʱⲿ͵P3ڽTTL
P3ΪһI/O⣬Ҫ;ĵڶܣ2-2ʾ
⣬P3ڻһЩFlashٴ洢̺ͳУĿźš g)RSTλ롣ʱRSTųϸߵƽʹƬλ
ALE/PROGⲿ洢ݴ洢ʱALE(ַ)ַĵ8λֽڡһ£ALEʱƵʵ1/6̶źţɶʱӻڶʱĿġҪעǣÿ ⲿݴ洢ʱһALE塣