int e l 10.2 EPROM PROGRAMMING CONFIGURATION / TIMING With the proper hardware, the MCS BASIC-52 device can program just about any EPROM or EEPROM device. The only requirement for EPROM programming is that the EPROM to be programmed is addressed starting at location 8000H. MCS BASIC-52 requires very little external hardware to program EPROMS. All of the critical EPROM programming timings are generated by three I/O port pins on the MCS BASIC-52 device. These pins provide the following signals: P1.3 -- ALE DISABLE PORT 1, BIT 3 (pin 4 on the 8052AH) is used to DISABLE the ALE signal to the external latched required by the 8052AH when external memory is addressed.
This pin should be logically ANDED with ALE. A simple TTL gate, such as a 74LS08 can be used to perform the ANDING function. Under normal operation, P1.3 is in a logical high state (1). ONLY DURING EPROM PROGRAMMING IS P1.3 PLACED IN A LOGICAL LOW STATE (0). Disabling the ALE signal to the external latch is required to program EPROMS because of the way MCS BASIC-52 carries out the EPROM programming process. During programming, MCS BASIC-52 treats I/O PORT 0 and I/O PORT 2 as I/O ports, not as address/ data ports. MCS BASIC-52 first writes the low order address to be programmed to PORT 0.
The data in PORT 0 is then latched into the external address latch and then MCS BASIC-52 disables the ALE signal to the latch by clearing bit P1.3. Thus, the low order address is "permanently" stored in the external latch. MCS BASIC-52 then writes the high order address to PORT 2 and the DATA to be programmed to PORT 0. So, the external address latch contains the low order address, PORT 2 contains the high order address, and PORT 0 contains the DATA when EPROM programming occurs. IMPORTANT NOTES When PORT 0 on the 8052AH is used as an I/O port, the output structure is an "open drain" configuration.
This requires that "pull-up" resistors be placed on PORT 0 to permit MCS B ASIC-52 to program EPROMS. Experimentally, 10K ohm pull-ups resistors on PORT 0 have yielded satisfactory results. In Version 1.1, INT0 must be kept high when programming EPROMs. - 135 -