beautypg.com

NEC PD78214 User Manual

Page 373

background image

344

µ

PD78214 Sub-Series

Example of correct coding (2)

LOOP:

BT IF0H.3,

$NEXT

BR $LOOP

NEXT:

(6) In addition, when you have to use a coding of the instructions listed in Section 12.3.5 consecutively, yet expect

frequent occurrence of interrupts and macro services, insert NOP instructions in the coding to allow time
during which interrupts and macro service are accepted.

(7) With the type C macro service, the MPT and MPD are incremented only at the lower bits. If a carry occurs at

bit 7 of the MPTL or MPDL, it is ignored; so the higher 8 bits are not affected.

(8) When the external memory is expanded (or always with the

µPD78213), an illegal write access operation may

occur during the type A macro service. This illegal write access occurs when any of the following three
conditions is satisfied.

1.

For the type A macro service, when data D0H through DFH is transferred from memory to an SFR.

2.

For the type A macro service, when macro service transfers data from an SFR to a buffer (memory) at
0FED0H through 0FEDFH.

3.

For the type C macro service, when the MPTL address is 0FED0H through 0FEDFH.

An illegal write access is processed in the same manner as the normal memory access. In addition, wait states
may be inserted according to the setting of the PW20 and PW21 bits of the memory expansion mode register
(MM). Table 12-9 lists the conditions under which an illegal write access occurs and the corresponding
operations.

Table 12-12 Illegal Write Access Conditions and Corresponding Operations

Condition

Macro service

type

1

2

3

A

A

C

Address

Address of a destination SFR

Address of a source SFR

Address of a destination SFR

(CR10 or CR11)

Illegal write access

Data

Data transferred by macro

service

Lower 8 bits of the address of

the destination buffer (memory)

Lower 8 bits of the address of

the MPTL

This problem may be solved by the following methods.

1.

It is difficult for software to solve the problem if it occurs under condition 1, because it depends on the
transfer data. Therefore, use an external address decoder circuit to keep the image in the area of 0FF00H
through 0FFFFH from overlapping the memory addresses of the external circuit.

2.

If the macro service to be used does not satisfy condition 1 (i.e., if data is not transferred from an SFR to
memory), and under condition 2, locate the buffer area so that its addresses are not 0FED0H through
0FEDFH.

The above problem also occurs with an in-circuit emulator.

(9) For the type B service macro, the following registers cannot be used as SFRs.

IF0L, IF0H, MK0L, MK0H, PR0L, PR0H, ISM0L, ISM0H, and IST

Remark The BTCLR would be more convenient than the

BT, because it clears the flags automatically.

Interrupts or macro services will not be kept pending long,
because they are processed after the BR is executed.

This manual is related to the following products: