SN8P26L38
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 112
Version 1.5
10.2.3 IRR AUTO-LOAD REGISTER
IRR decides IR signal frequency.
IR timer is with auto-load function. When IRC overflow occurs, IRR value will load
to IRC. It is easy to generate an accurate time for IR signal cycle, and users don’t reset IRC during interrupt service
routine.
IR is double buffer design. If new IRR value is set by program, the new value is stored in 1
st
buffer. Until IR overflow
occurs, the new value moves to real IRR buffer.
0CDH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
IRR
IRR7
IRR6
IRR5
IRR4
IRR3
IRR2
IRR1
IRR0
Read/Write
W
W
W
W
W
W
W
W
After reset
0
0
0
0
0
0
0
0
The equation of IRRinitial value is as following.
IRR initial value = 256 - (IR interrupt interval time * input clock)
Note: The input clock is 4MHz of external 4MHz oscillator.
Example: Set IR cycle frequency is 38KHz. Input clock is 4MHz.
IRR initial value = 256 - (IR interrupt interval time * input clock)
IR interval time = 1/38KHz = 26.3us
Input clock = external oscillator 4MHz.
IRR = 256 - (26.3us * 4MHz)
= 150.8
≈ 151
= 97h