EM78P468N/EM78P468L
8-Bit Microcontroller
44 •
Product Specification (V1.5) 02.15.2007
(This specification is subject to change without further notice)
IR/PWM Function Enable Flowchart
(a) IR application (b) PWM application
Fig. 27 IR/PWM Function Enable Flowchart
SET P5.7 to Output state (IOC 50)
SET P5.7 for IR/PWM Function Output Pin (RE)
SET Counter 2 clock source and prescaler (IOC91)
SET Counter 2
(IOC0)
, High pulse width time
(IOD0)
, Low pulse width time
(IOCE0)
preset value
Enable I
(RE)
HF="1", and IRE="1"
Enable Counter 2, High pulse width timer and Low
pulse width time
(RC)
SET High pulse width timer, Low pulse width time
clock source and prescaler (IOCA1)
Enable HPWT and LPWT Interrupt
Set
IOCF0
and ENI instruction
Start
END
SET P5.7 to Output state (IOC 50)
SET P5.7 for IR/PWM Function Output Pin (RE)
High pulse width time
(IOD0)
, Low pulse width time
(IOCE0) preset value
Enable IR (RE)
HF="0", and IRE="1"
Enable high pulse width timer and Low pulse width
Timer (RC)
SET Hi
h pulse width timer, Low pulse width time
clock source and prescaler (IOCA1)
Enable HPWT and LPWT Interrupt
Set
IOCF0
and ENI instruction
Start
END