Writing Data To Up/Down Count Register (Udcr) - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

13.5.2 Writing data to up/down count register (UDCR)

Writing data directly to UDCR from a data bus is not permitted. This section includes
procedures for writing any data to UDCR.
Writing data to UDCR
Data can be written to UDCR with the following procedures:
1. Write the data to be written to UDCR to RCR first.
2. Writing "1" to CCRH: CTUT transfers the data from RCR to UDCR.
Clearing the counter
In addition to write "0000
Clearing with reset input (initialize)
Clearing with an edge input from the ZIN pin
Clearing by writing "0" to CCRL: UDCC
Clearing with the compare function
Such clear operations are is performed regardless of the occurrence for count start/stop.
Count clear/gate function
The ZIN pin is used as either a count clear or gate function by CCRH: CGSC.
If the count clear function starts, the counter is cleared by the edge input from the ZIN pin.
CCRL: CGE1/CGE0 select the edge of the ZIN pin input signal where the counter is cleared.
When the gate function starts, the count is enabled or disabled depending on the level input
from the ZIN pin. The level of the ZIN pin input signal used to enable the count selects using
CCRL: CGE1/CGE0.
This function is available for all count modes.
Table 13.5-4 Selection of ZIN pin function
CGSC
ZIN pin function
0
Counter clear function
1
Gate function
CHAPTER 13 8/16-BIT UP/DOWN COUNTER/TIMER
" to UDCR, the following procedures also clear the counter.
H
CGE1, CGE0
Counter clear function
00
Detect prohibited
B
01
Rising edge
B
10
Falling edge
B
Gate function
Detect prohibited
"L" level
"H" level
283

Advertisement

Table of Contents
loading

Table of Contents