Providing an Ideal External Program Memory Solution for the Atmel 89XXX Microcontrollers AT27C520 The Atmel AT27C520 EPROM, with its 64K Bytes of storage, combined with a novel multiplexed address/data scheme and an internal latch pin, make it the ideal External Program Memory storage solution for the Atmel AT89XXX MicroController family. A simple scheme can be constructed where the AT89XXX P0 port serves as both the lower order address byte (to the EPROM) as well as the data bus (from the EPROM), while the P2 port serves as the high order address byte (to the EPROM). Additionally, the AT27C520 can be accessed in less than 90 nS. max. eliminating wasteful wait states. Figure 1 shows the necessary block diagram. Table 1 contains the necessary interface connections. Application Note AT27C520 Figure 1. AT89XXX P0 ALE PSEN P2 AT27C520 AD0-7 ALE OE/VPP A8-15 Providing an Ideal External Program Memory Solution for the Atmel 89XXX MicroController s 0983B-B–12/97 5-117 Table 1. AT89XXX mnemonic AT27C520 mnemonic (PORT 0) (Multiplexed Address and Data) P0.0 (AD0) AD0 P0.1 (AD1) AD1 P0.2 (AD2) AD2 P0.3 (AD3) AD3 P0.4 (AD4) AD4 P0.5 (AD5) AD5 P0.6 (AD6) AD6 P0.7 (AD7) AD7 (PORT 2) (Address) P2.0 (A8) A8 P2.1 (A9) A9 P2.2 (A10) A10 P2.3 (A11) A11 P2.4 (A12) A12 P2.5 (A13) A13 P2.6 (A14) A14 P2.7 (A15) A15 (Control) (Control) ALE ALE PSEN/ OE/VPP A read cycle for the AT27C520 is achieved as follows: 1. OE/VPP is asserted high by the PSEN/line 2. Address Latch Enable (ALE) is asserted high by the ALE line 3. Low order address byte (AD0-7) is asserted by the P0 port 5-118 Microcontroller 4. High order address byte (A8-15) is asserted by the P2 port 5. ALE is lowered (address is latched) 6. OE/VPP is asserted low by the PSEN/line 7. Data is driven by the EPROM onto the P0 port Microcontroller AT27C520 Read Timing tALE ALE OE/VPP tDF tAS tAH AD7 - AD0 tOE ADDRESS IN tOH DATA OUT tACC A15 - A8 AT89XXX External Program Memory Read Cycle tLHLL ALE tAVLL tLLIV tLLPL tPLIV PSEN tPLAZ tLLAX PORT 0 tPLPH tPXAV tPXIZ tPXIX A0 - A7 INSTR IN A0 - A7 tAVIV PORT 2 A8 - A15 A8 - A15 Summary The AT27C520 EPROM provides the ideal External Program Memory for the AT89XXX Microcontroller family. A straightforward, pin to pin connection scheme, with no additional external glue logic or latches, ensures a seamless interface. Additionally, the AT27C520 is available in a power saving Low Voltage, which makes it the perfect choice for Atmel’s Low Voltage 89XXX Microcontrollers. The AT27C520 is now available in space saving TSSOP and SOIC packages. For complete device specifications, please refer to the AT27C520 datasheet. 5-119