English
Language : 

UPD784938 Datasheet, PDF (593/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 23 INTERRUPT FUNCTIONS
(2) Configuration of macro service channel
The macro service channel consists of only a 16-bit macro service counter. The low-order 8 bits of the address of the
MSC are written to the channel pointer.
Figure 23-40. Counter Mode
Macro service channel
7
0
Macro service High-order 8 bytes
counter (MSC) Low-order 8 bytes
High-order addresses
Channel pointer
Mode register
Low-order addresses
(3) Example of using counter mode
Here is an example of counting the number of edges input to external interrupt pin INTP5.
Figure 23-41. Counting Number of Edges
(Internal RAM)
High-order 8 bytes
MSC 0EH
–1
Low-order 8 bytes
OFE7EH
Channel pointer 7EH
Mode register 00H
Counter mode
Interrupt request is generated when MSC = 0.
INTP5/P26
Internal bus
INTP5 macro service request
Remark The internal RAM address in the figure above is the value when the LOCATION 0 instruction is executed.
When the LOCATION 0FH instruction is executed, add 0F0000H to this value.
Preliminary User’s Manual U13987EJ1V0UM00
593