English
Language : 

MC705P6ACPE Datasheet, PDF (58/98 Pages) Freescale Semiconductor, Inc – M68HC05 Microcontrollers
EPROM
Address $001C
Bit 7
6
5
4
3
2
1
Read: 0
0
0
0
0
0
ELAT
Write:
Reset: 0
0
0
0
0
0
0
= Unimplemented
Figure 10-1. EPROM Programming Register (EPROG)
Bit 0
EPGM
0
EPGM — EPROM Program Control
If the EPGM bit is set, programming power is applied to the EPROM array. If the EPGM bit is cleared,
programming power is removed from the EPROM array. The EPGM bit cannot be set unless the ELAT
bit is set already.
Whenever the ELAT bit is cleared, the EPGM bit is cleared also. Both the EPGM and the ELAT bit
cannot be set using the same write instruction. Any attempt to set both the EPGM and ELAT bit on the
same write instruction cycle will result in the ELAT bit being set and the EPGM bit being cleared. The
EPGM bit is a read-write bit and can be read at any time. The EPGM bit is cleared by reset.
ELAT— EPROM Latch Control
If the ELAT bit is set, the EPROM address and data bus are configured for programming to the array.
If the ELAT bit is cleared, the EPROM address and data bus are configured for normal reading of data
from the array. When the ELAT bit is set, the address and data bus are latched in the EPROM array
when a subsequent write to the array is made. Data in the EPROM array cannot be read if the ELAT
bit is set.
Whenever the ELAT bit is cleared, the EPGM bit is cleared also. Both the EPGM and the ELAT bit
cannot be set using the same write instruction. Any attempt to set both the EPGM and ELAT bit on the
same write instruction cycle will result in the ELAT bit being set and the EPGM bit being cleared. The
ELAT bit is a read-write bit and can be read at any time. The ELAT bit is cleared by reset.
To program a byte of EPROM, manipulate the EPROG register as follows:
1. Set the ELAT bit in the EPROG register.
2. Write the desired data to the desired EPROM address.
3. Set the EPGM bit in the EPROG register for the specified programming time, tEPGM.
4. Clear the ELAT and EPGM bits in the EPROG register.
This sequence is also shown in the sample program listing in Table 10-1.
Table 10-1. EPROM Programming Routine
001C
0055
0700
0000
00D0
00D0
00D2
00D4
00D6
00D9
00DB
00DD
00DF
A6 02
B7 1C
A6 55
C7 07 00
10 1C
AD 03
3F 1C
81
EPROG
DATA
EPROM
EPGM
ORG
EQU $1C
EQU $55
EQU $700
EQU $00
$D0
LDA #$04
STA EPROG
LDA #DATA
STA EPROM
BSET EPGM, EPROG
BSR DELAY
CLR EPROG
RTS
PROGRAMMING REG
DATA VALUE
A SAMPLE EPROM ADX
EPGM BIT IN EPROG REG
SET LAT BIT IN EPROG
DATA BYTE
WRITE IT TO EPROM LOC
TURN ON PGM VOLTAGE
WAIT 4 ms MINIMUM
CLR LAT AND PGM BITS
MC68HC705P6A Advance Information Data Sheet, Rev. 2.1
58
Freescale Semiconductor