Macro Service Type C; Interrupt Requests That Can Specify Macro Service And Sfrs (Type C); Illegal Write Access Conditions And Corresponding Operations - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

12.4.7 Macro Service Type C

(1) Operation
The type C macro service controls 8-bit timer/counter 1 and the real-time output port simultaneously. This
macro service transfers data to both the compare register for 8-bit timer/counter 1 and the buffer register for
the real-time output port upon one interrupt request.
Only INTC10 and INTC11 can use the type C macro service. Their transfer destination registers are
predetermined as listed in Table 12-8.
Table 12-10 Interrupt Requests That Can Specify Macro Service and SFRs (Type C)
Interrupt request
INTC10
INTC11
Besides the basic data transfer function described above, the type C macro service can have the following
ancillary functions to reduce the required buffer area and load on the software.
(a) Retention of the timer macro service pointer
It can be specified whether to retain or increment the timer macro service pointer (MPT).
(b) Automatic addition
This function adds data addressed by the timer macro service pointer (MPT) to the value in the compare
register, and transfers the sum to the compare register.
If this function is not used, data addressed by the MPT is transferred to the compare register.
(c) Ring control
This function repeats to output a pattern of data with a predetermined length automatically.
These ancillary functions are specified in the mode register in the macro service control word.
Cautions 1. With the type C macro service, the MPT and MPD are incremented only at the lower 8 bits. If a carry occurs at bit 7 of
the MPTL or MPDL, it is ignored; so the higher 8 bits are not affected.
2. When the external memory is expanded (or always with the µ PD78213), an illegal write access operation may occur during
the type C macro service. This illegal write access occurs when the following condition is satisfied.
• When the MPTL address is 0FED0H through 0FEDFH.
An illegal write access is performed 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-
11 lists the conditions under which an illegal write access occurs and the corresponding operations.
Table 12-11 Illegal Write Access Conditions and Corresponding Operations
This problem may be solved by the following method.
• Locate the MPTL so that its address does not coincide with an address from 0FED0H through 0FEDFH.
The above problem also occurs with an in-circuit emulator.
Data transfer destination
addressed by the MPT
CR10
CR11
Illegal write access
Address
Address of a destination SFR
(CR10 or CR11)
Chapter 12 Interrupt Functions
Data transfer destination
addressed by the MPD
P0L or P0H (specified by the mode register)
P0L or P0H (specified by the mode register)
Data
Lower 8 bits of the address of
the MPTL
12
331

Advertisement

Table of Contents
loading

Table of Contents