
150
2. APPLICAT ION
MITSUBISHI MICROCOMPUTER
3819 Group
2.7 Zero cross detection circuit
3819 Group USER’S MANUAL
2.7.3 Zero cross detection circuit application example 1
Clock count using ZCR interrupt (without using a noise filter)
Outline :
The clock is counted up every second by using the ZCR interrupts.
Specifications :
The noise filter is not used.
The commercial frequency (50 Hz or 60 Hz) is input.
The clock is counted up by using the ZCR interrupts.
Figure 2. 7. 6 shows a setting of related registers.
Fig. 2.7.6 Setting of related registers [Clock count using ZCR interrupt (without using a noise filter)]
Passing through the zero cross detection circuit (
Note
)
ZCRCON
Zero cross detection control register (Address:39
16
)
1
0 0
Noise filter sampling clock : without using a noise filter
ZCR active edge : Falling edge active (
Note
)
INTEDGE
Interrupt edge selection register (Address:3A
16
)
0
IREQ1
Interrupt request register 1 (Address:3C
16
)
Set the INT
1
/ZCR interrupt request bit to “0”
0
ICON1
Interrupt control register 1 (Address:3E
16
)
INT
1
/ZCR interrupt : Enabled
1
IREQ1
Interrupt request register 1 (Address:3C
16
)
ZCR interrupt request
When changing the values of bit 0 of the zero cross detection control register and bit 1 of the
interrupt edge selection register, make sure the following contents.
1. During changeing, set bit 1 of the interrupt control register 1 to “0”.
2. After changeing, set bit 1 of the interrupt request register 1 to “0”.
Note :