NEC PD17062 User Manual
Page 175

175
µ
PD17062
14.3.3 Cautions at CE Reset
When CE reset is used, careful attention must be given to points (1) and (2) below regardless of the
instruction being executed.
(1) Time required for clock and other timer processing
When writing a clock program by using timer carry FF and timer interrupts, the program must end
processing within a certain time.
For details, see Sections 12.4 and 12.6.
(2) Processing of data, flags, etc. used in the program
Care must be exercised when rewriting the contents of data, flags, etc. that cannot be processed by one
instruction so that the contents, such as the last channel, do not change even when CE reset is applied.
Two examples are given below:
Example 1.
;
#
LCTUNE :
Initial reception
; The last channel is received.
The channel indicated by
the contents of M1 and
M2 is received.
MAIN :
; Main processing
Channel change
; The changed channel is assigned to general-purpose
; registers R1 and R2.
;
$
ST
M1, R1
; The last channel is rewritten.
;
%
ST
M2, R2
BR
MAIN
In this example, if the last channel is 12H, then the data memory contents of M1 and M2 will be 1H and
2H, respectively.
When CE reset is applied, the last channel (Channel 12) is received in
#.
When the channel is changed in the main processing, the changed channel is rewritten to M1 and M2 in
$ and %.
When the channel is changed to 04H, 0H and 4H are rewritten to M1 and M2 in
$ and %. If CE reset is
applied after
$, the reset process runs without executing %.
Since this results in the last channel being 02H, Channel 02 is received in
#.
This can be avoided by using a program shown in example 2.