English
Language : 

PCA3351C Datasheet, PDF (18/36 Pages) NXP Semiconductors – 8-bit microcontrollers with DTMF generator and 128 bytes EEPROM
Philips Semiconductors
8-bit microcontrollers with DTMF generator
and 128 bytes EEPROM
Product specification
PCA3351C; 52C; 53C;
PCD3351A; 52A; 53A
7.5.5 ERASE PAGE
The EEPROM flags are set as described in Section 7.5.1.
The corresponding page bytes are erased.
The last instruction also starts Timer 2. Erasure takes
5 ms. A single-byte erase is simply a special case of ‘erase
page’.
Note that ADDR does not auto-increment after an erase
cycle.
Table 23 Erase page
INSTRUCTION
MOV A, #EWP + MC3 + MC2 + MC1
MOV EPCR, A
RESULT
‘erase page’
control word
start ‘erase
page’ cycle
7.6 Timer 2
Timer 2 is a 8-bit down-counter decremented at a rate of
1⁄480 × fxtal. It may be used either for EEPROM timing or as
a general purpose timer. Conflicts between the two
applications should be carefully avoided.
7.6.1 TIMER 2 FOR EEPROM TIMING
When used for EEPROM timing, Timer 2 serves to
generate the 5 ms intervals needed for erasing or writing
the EEPROM. At the decrement rate of 1⁄480 × fxtal, the
reload value for a 5 ms interval is a function of fxtal.
Table 24 summarizes the required reload values for a
number of oscillator frequencies.
Timer 2 is started by setting bit EWP in the EPCR.
The Timer Register T2 is loaded with the reload value from
RELR. T2 decrements to zero.
For an erase/write cycle, underflow of T2 indicates the end
of the erase operation. Therefore, Timer Register T2 is
reloaded from RELR for another 5 ms interval during
which the flagged EEPROM latches are copied to the
corresponding bytes in the page addressed by ADDR.
The second underflow of an erase/write cycle and the first
underflow of write page and erase page conclude the
corresponding EEPROM cycle. Timer 2 is stopped, T2F is
set whereas EWP and MC1 to MC3 are cleared.
Table 24 Reload values as a function of fxtal
fxtal
(MHz)
RELOAD VALUE(1)
(HEX)
1
0A
2
14
3.58
25
6
3E
10
68
16
A6
Note
1. The reload value is (5 × 10−3 × 1⁄480 × fxtal) − 1;
fxtal in MHz.
7.6.2 TIMER 2 AS A GENERAL PURPOSE TIMER
When used for purposes other than EEPROM timing,
Timer 2 is started by setting STT2. The Timer Register T2
(see Table 27) is loaded with the reload value from RELR.
T2 decrements to zero. On underflow, T2 is reloaded from
RELR, T2F is set and T2 continues to decrement.
Timer 2 can be stopped at any time by clearing STT2.
The value of T2 is then held and can be read out. After
setting STT2 again, Timer 2 decrements from the reload
value. Alternatively, it is possible to read T2 ‘on the fly’ i.e.
while Timer 2 is operating.
1999 Oct 28
18