Fujitsu FR60 Computer Hardware User Manual


  Open as PDF
of 1038
 
846
Chapter 41 Up/Down Counter
4.Register
4.4 UDRC: Up/Down Reload/Compare Register
This register is used to reload a value to Up/Down Counter and for comparison.
This register is also used to write to Up/Down Counter.
UDRC10 (Up/Down Counter 0/1): Address 0300
H
(Access: Byte, Half-Word)
UDRC32 (Up/Down Counter 2/3): Address 0310
H
(Access: Byte, Half-Word)
Depending on the setting of the 16 bit mode enable bit (CCR.M16E), this register behaves differently.
16 Bit Mode (M16E=“1”)
In the 16 bit mode, this register functions as 16-bit reload/compare register.
UDCR10 (Reload compare): Address 00300
H
(Access: Byte, Half-word)
UDCR32 (Reload compare): Address 00310
H
(Access: Byte, Half-word)
(For attributes, refer to “Meaning of Bit Attribute Symbols (Page No.10)”.)
The reload and compare values are same.
When Up/Down Counter counts up, the value in RCR is used as a compare value.
When Up/Down Counter counts down, underflow is generated and the value in RCR is used as a reload
value for reloading.
(Up/Down Counter counts between 0000H and the reload/compare value.)
In the 16 bit mode, be sure to write by half-word access.
8 Bit Mode (M16E=“0”)
In the 8 bit mode, this register functions as 8-bit reload/compare register 0 and 8-bit reload/compare register 1.
UDCR1 (reload compare 1): Address 00300
H
(Access: Byte, Half-word)
UDCR0 (reload compare 0): Address 00301
H
(Access: Byte, Half-word)
UDCR3 (reload compare 3): Address 00310
H
(Access: Byte, Half-word)
UDCR2 (reload compare 2): Address 00311
H
(Access: Byte, Half-word)
(For attributes, refer to “Meaning of Bit Attribute Symbols (Page No.10)”.)
The reload and compare values are same.
When Up/Down Counter counts up, the value in RCR is used as a compare value.
When Up/Down Counter counts down, underflow is generated and the value in RCR is used as a reload
value for reloading.
(Up/Down Counter counts between 0000H and the reload/compare value.)
Perform the following procedure to write to Up/Down Counter.
15 14 13 12 11 10 9 8 bit
D15 D14 D13 D12 D11 D10 D09 D08
0 0 0 0 0 0 0 0 Initial value
RX, W RX, W RX, W RX, W RX, W RX, W RX, W RX, W Attribute
76543210bit
D07 D06 D05 D04 D03 D02 D01 D00
0 0 0 0 0 0 0 0 Initial value
RX, W RX, W RX, W RX, W RX, W RX, W RX, W RX, W Attribute
76543210bit
D07 D06 D05 D04 D03 D02 D01 D00
0 0 0 0 0 0 0 0 Initial value
RX, W RX, W RX, W RX, W RX, W RX, W RX, W RX, W Attribute