单片机原理与接口技术 (3).pdf
《单片机原理与接口技术 (3).pdf》由会员分享,可在线阅读,更多相关《单片机原理与接口技术 (3).pdf(30页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 2487BMICRO12/03FeaturesCompatible with MCS-51 Products4K Bytes of In-System Programmable(ISP)Flash Memory Endurance:1000 Write/Erase Cycles4.0V to 5.5V Operating RangeFully Static Operation:0 Hz to 33 MHzThree-level Program Memory Lock128 x 8-bit Internal RAM32 Programmable I/O LinesTwo 16-bit Time
2、r/CountersSix Interrupt SourcesFull Duplex UART Serial ChannelLow-power Idle and Power-down ModesInterrupt Recovery from Power-down ModeWatchdog TimerDual Data PointerPower-off FlagFast Programming TimeFlexible ISP Programming(Byte and Page Mode)DescriptionThe AT89S51 is a low-power,high-performance
3、 CMOS 8-bit microcontroller with 4Kbytes of In-System Programmable Flash memory.The device is manufactured usingAtmels high-density nonvolatile memory technology and is compatible with the indus-try-standard 80C51 instruction set and pinout.The on-chip Flash allows the programmemory to be reprogramm
4、ed in-system or by a conventional nonvolatile memory pro-grammer.By combining a versatile 8-bit CPU with In-System Programmable Flash ona monolithic chip,the Atmel AT89S51 is a powerful microcontroller which provides ahighly-flexible and cost-effective solution to many embedded control applications.
5、The AT89S51 provides the following standard features:4K bytes of Flash,128 bytes ofRAM,32 I/O lines,Watchdog timer,two data pointers,two 16-bit timer/counters,a five-vector two-level interrupt architecture,a full duplex serial port,on-chip oscillator,andclock circuitry.In addition,the AT89S51 is des
6、igned with static logic for operationdown to zero frequency and supports two software selectable power saving modes.The Idle Mode stops the CPU while allowing the RAM,timer/counters,serial port,andinterrupt system to continue functioning.The Power-down mode saves the RAM con-tents but freezes the os
7、cillator,disabling all other chip functions until the next externalinterrupt or hardware reset.8-bit Microcontroller with 4K Bytes In-System Programmable FlashAT89S512 AT89S512487BMICRO12/03Pin ConfigurationsPDIPTQFP12345678910111213141516171819204039383736353433323130292827262524232221 P1.0 P1.1P1.
8、2P1.3P1.4(MOSI)P1.5(MISO)P1.6(SCK)P1.7RST(RXD)P3.0(TXD)P3.1(INT0)P3.2(INT1)P3.3(T0)P3.4(T1)P3.5(WR)P3.6(RD)P3.7XTAL2XTAL1GNDVCCP0.0(AD0)P0.1(AD1)P0.2(AD2)P0.3(AD3)P0.4(AD4)P0.5(AD5)P0.6(AD6)P0.7(AD7)EA/VPPALE/PROGPSENP2.7(A15)P2.6(A14)P2.5(A13)P2.4(A12)P2.3(A11)P2.2(A10)P2.1(A9)P2.0(A8)1234567891011
9、333231302928272625242344434241403938373635341213141516171819202122(MOSI)P1.5(MISO)P1.6(SCK)P1.7RST(RXD)P3.0NC(TXD)P3.1(INT0)P3.2(INT1)P3.3(T0)P3.4(T1)P3.5P0.4(AD4)P0.5(AD5)P0.6(AD6)P0.7(AD7)EA/VPPNCALE/PROGPSENP2.7(A15)P2.6(A14)P2.5(A13)P1.4P1.3P1.2P1.1 P1.0 NCVCCP0.0(AD0)P0.1(AD1)P0.2(AD2)P0.3(AD3)
10、(WR)P3.6(RD)P3.7XTAL2XTAL1GNDGND(A8)P2.0(A9)P2.1(A10)P2.2(A11)P2.3(A12)P2.4PLCCPDIP78910111213141516173938373635343332313029(MOSI)P1.5(MISO)P1.6(SCK)P1.7RST(RXD)P3.0NC(TXD)P3.1(INT0)P3.2(INT1)P3.3(T0)P3.4(T1)P3.5P0.4(AD4)P0.5(AD5)P0.6(AD6)P0.7(AD7)EA/VPPNCALE/PROGPSENP2.7(A15)P2.6(A14)P2.5(A13)65432
11、144434241401819202122232425262728(WR)P3.6(RD)P3.7XTAL2XTAL1GNDNC(A8)P2.0(A9)P2.1(A10)P2.2(A11)P2.3(A12)P2.4P1.4 P1.3P1.2P1.1 P1.0 NCVCCP0.0(AD0)P0.1(AD1)P0.2(AD2)P0.3(AD3)123456789101112131415161718192021424140393837363534333231302928272625242322RST(RXD)P3.0(TXD)P3.1(INT0)P3.2(INT1)P3.3(T0)P3.4(T1)P
12、3.5(WR)P3.6(RD)P3.7XTAL2XTAL1GNDPWRGND(A8)P2.0(A9)P2.1(A10)P2.2(A11)P2.3(A12)P2.4(A13)P2.5(A14)P2.6(A15)P2.7P1.7(SCK)P1.6(MISO)P1.5(MOSI)P1.4P1.3P1.2P1.1P1.0VDDPWRVDDP0.0(AD0)P0.1(AD1)P0.2(AD2)P0.3(AD3)P0.4(AD4)P0.5(AD5)P0.6(AD6)P0.7(AD7)EA/VPPALE/PROGPSEN3 AT89S512487BMICRO12/03Block DiagramPORT 2
13、DRIVERSPORT 2LATCHP2.0-P2.7FLASHPORT 0LATCHRAMPROGRAMADDRESSREGISTERBUFFERPCINCREMENTERPROGRAMCOUNTERDUAL DPTRINSTRUCTIONREGISTERBREGISTERINTERRUPT,SERIAL PORT,AND TIMER BLOCKSSTACKPOINTERACCTMP2TMP1ALUPSWTIMINGANDCONTROLPORT 1 DRIVERSP1.0-P1.7PORT 3LATCHPORT 3 DRIVERSP3.0-P3.7OSCGNDVCCPSENALE/PROGE
14、A/VPPRSTRAM ADDR.REGISTERPORT 0 DRIVERSP0.0-P0.7PORT 1LATCHWATCHDOGISPPORTPROGRAMLOGIC4 AT89S512487BMICRO12/03Pin DescriptionVCCSupply voltage(all packages except 42-PDIP).GNDGround(all packages except 42-PDIP;for 42-PDIP GND connects only the logic core and theembedded program memory).VDDSupply vol
15、tage for the 42-PDIP which connects only the logic core and the embedded programmemory.PWRVDDSupply voltage for the 42-PDIP which connects only the I/O Pad Drivers.The applicationboard MUST connect both VDD and PWRVDD to the board supply voltage.PWRGNDGround for the 42-PDIP which connects only the I
16、/O Pad Drivers.PWRGND and GND areweakly connected through the common silicon substrate,but not through any metal link.Theapplication board MUST connect both GND and PWRGND to the board ground.Port 0Port 0 is an 8-bit open drain bi-directional I/O port.As an output port,each pin can sink eightTTL inp
17、uts.When 1s are written to port 0 pins,the pins can be used as high-impedanceinputs.Port 0 can also be configured to be the multiplexed low-order address/data bus duringaccesses to external program and data memory.In this mode,P0 has internal pull-ups.Port 0 also receives the code bytes during Flash
18、 programming and outputs the code bytesduring program verification.External pull-ups are required during program verification.Port 1Port 1 is an 8-bit bi-directional I/O port with internal pull-ups.The Port 1 output buffers cansink/source four TTL inputs.When 1s are written to Port 1 pins,they are p
19、ulled high by theinternal pull-ups and can be used as inputs.As inputs,Port 1 pins that are externally beingpulled low will source current(IIL)because of the internal pull-ups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bi-direc
20、tional I/O port with internal pull-ups.The Port 2 output buffers cansink/source four TTL inputs.When 1s are written to Port 2 pins,they are pulled high by theinternal pull-ups and can be used as inputs.As inputs,Port 2 pins that are externally beingpulled low will source current(IIL)because of the i
21、nternal pull-ups.Port 2 emits the high-order address byte during fetches from external program memory andduring accesses to external data memory that use 16-bit addresses(MOVX DPTR).In thisapplication,Port 2 uses strong internal pull-ups when emitting 1s.During accesses to externaldata memory that u
22、se 8-bit addresses(MOVX RI),Port 2 emits the contents of the P2 Spe-cial Function Register.Port 2 also receives the high-order address bits and some control signals during Flash pro-gramming and verification.Port PinAlternate FunctionsP1.5MOSI(used for In-System Programming)P1.6MISO(used for In-Syst
23、em Programming)P1.7SCK(used for In-System Programming)5 AT89S512487BMICRO12/03Port 3Port 3 is an 8-bit bi-directional I/O port with internal pull-ups.The Port 3 output buffers cansink/source four TTL inputs.When 1s are written to Port 3 pins,they are pulled high by theinternal pull-ups and can be us
24、ed as inputs.As inputs,Port 3 pins that are externally beingpulled low will source current(IIL)because of the pull-ups.Port 3 receives some control signals for Flash programming and verification.Port 3 also serves the functions of various special features of the AT89S51,as shown in thefollowing tabl
25、e.RSTReset input.A high on this pin for two machine cycles while the oscillator is running resetsthe device.This pin drives High for 98 oscillator periods after the Watchdog times out.TheDISRTO bit in SFR AUXR(address 8EH)can be used to disable this feature.In the defaultstate of bit DISRTO,the RESE
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 单片机原理与接口技术 3 单片机 原理 接口 技术
限制150内