Download Print this page

Renesas R8C/11 Application Note page 12

Hide thumbs Also See for R8C/11:

Advertisement

Adjusting the Frequency of the High-speed On-chip Oscillator Using a Commercial Frequency
4.2.9 High-speed On-chip Ooscillator Adjust Function (INT
int3_hz_in()
first_read=0?
No (second and subsequent timer value
reads)
new_timer = tm0
dat = new_timer - old_timer
old_timer = new_timer
data = data / 100
Input commercial
frequency ?
dat ?
data < 200
(high-speed on-chip oscillator slower than 8
MHz)
HR1 != 0x00?
Yes
HR1 = HR1 - 1
return
REJ05B0471-0100Z/Rev.1.00
Interrupt processing to be executed when a rising edge of the input
signal to the I N T
Yes (first timer value read)
60Hz(dat <= 180)
50Hz(dat > 180)
No
HR1 < 0x7f?
HR1 = HR1 + 1
dat ?
data < 166
(high-speed on-chip oscillator slower than 8
MHz)
HR1 != 0x00?
Yes
HR1 = HR1 - 1
_______
3 Interrupt Function)
______
3 pin is detected.
first_read = 1
old_timer = tm0
return
data == 200
data > 200
(high-speed on-chip oscillator faster than
8 MHz)
No
Yes
data > 166
(high-speed on-chip oscillator
faster than 8 MHz)
No
HR1 < 0x7f?
HR1 = HR1 + 1
July 2004
R8C/11, R8C/13 Group
data == 166
No
Yes
Page 12 of 21

Advertisement

loading

This manual is also suitable for:

R8c/13