HT48RA0-3/HT48CA0-3
The values of CARH and CARL can be calculated from the following expressions.
CARL (CARL1.0, CARL0.7~CARL0.0) = ( fSYS ´ (1-D) ´ T) - 1
CARH (CARH1.0, CARH0.7~CARH0.0) = ( fSYS ´ D ´ T) - 1
D: Carrier duty ratio (0 < D < 1)
f
SYS: Input clock (Mhz)
T: Carrier cycle (ms)
Ensure to input values in the range of 001H to 1FFH to CARL and CARH.
Example:
f
SYS = 4MHz, fc = 38.1kHz, T = 1/ fc = 26.25ms, duty = 1/3
CARL = (4M ´ (1-1/3) ´ 26.25ms) - 1 = 69 = 45H
CARH = (4M ´ 1/3 ´ 26.25ms) - 1 = 34 = 22H
MOV A,045H
MOV CARL0,A
MOV A,022H
MOV CARH0,A
CLR
CARH1.1
; The carrier is started by clearing CARY(CARH1.1) = ²0²
·
Carrier output control
The remote controller carrier can be output from the REM pin by clearing (0) bit 9 (CARY) of the modulo register for
setting the high-level period (CARH).
When performing a carrier output, be sure to set the timer operation after setting the CARH (CARH1.0,
CARH0.7~CARH0.0) and CARL (CARL1.0, CARL0.7~CARL0.0) values.
Note that a malfunction may occur if the values of CARH (CARH1.0, CARH0.7~CARH0.0) and CARL (CARL1.0,
CARL0.7~CARL0.0) are changed while the carrier is being output from the REM pin.
Executing the timer manipulation instruction starts the carrier output from the low level.
T
i
m
e
r
O
u
t
p
u
t
T
i
m
e
:
(
S
e
t
v
a
l
u
e
+
1
)
x
6
4
/
f
T
i
m
e
r
O
u
t
p
u
t
C
a
r
r
i
e
r
t
L
S
e
e
N
o
t
e
t
H
Timer Output when Carrier Is an Output
Note: When the carrier signal is active and during the time when the signal is high, if the timer output should go low,
the carrier signal will first complete its high level period before going low.
Rev.1.10
13
October 12, 2007