Panasonic F77G User Manual page 149

Microcomputer mn101c series
Table of Contents

Advertisement

AC Zero-Cross Detector Setup Example (External interrupt 1)
AC zero-cross detector generates the external interrupt 1 (IRQ1) by using P21/ACZ pin.
An example setup procedure, with a description of each step is shown below.
Setup Procedure
(1)
Select the AC zero-cross detector
signal.
NFCTR0 (x'3F8E')
bp7
(2)
Set the interrupt level.
IRQ1ICR (x'3FE3')
bp7-6
(3)
Enable the interrupt.
IRQ1ICR (x'3FE3')
bp1
When the input signal level from P21/ACZ pin crosses 1/2 V
: P21IM
= 1
: IRQ1LV1-0= 10
: IRQ1IE
= 1
Description
(1) Set the P21IM flag of the noise filter control
register (NFCTR0) to "1" to select the AC
zero-cross detector signal as the external
interrupt 1 generation factor.
(2) Set the interrupt level by the IRQ1LV 1-0
flag of the IRQ1ICR register.
If the interrupt request flag has been already
set, clear the interrupt flag.
[
Chapter 3 3-1-4. Interrupt flag setup ]
(3) Set the IRQ1IE flag of the IRQ1ICR register to
"1" to enable the interrupt.
, the external interrupt 1 is generated.
DD
Chapter 3 Interrupts
III - 55
External Interrupts

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Panaxseries mn101c77cPanaxseries mn101f77g

Table of Contents