English
Language : 

Z8FS021 Datasheet, PDF (65/68 Pages) Zilog, Inc. – Select from an assortment of lenses and pyroelectric sensors to best fit your application
ZMOTION® Intrusion Detection
Product Specification
57
The flow diagram shown in Figure 12 displays the general software operation for Normal
Scan Rate mode.
RESET
Initialize Oscillator & WDT
Set up GPIO’s for application
e PIR
Initiali za tio n
I nitialize Flash Frequency Register
Enable ADC in PWRCTL0
Initialize API Registers
Recommended settings supplied in
lens/pyro configuration file
PIR Sca n R ate = 0
Set ePIR_Enable Regist er to
ePI R_ENABLE_PATTERN
Execute ePIR_INIT Macro
Set up Timer f or 1 Second Interrupt
Enable Global Interrupts
App lica tion
I nitializa tion
Wait for PI R Sensor Stable
ePIR_SC0:0=1
Main
App lication
Loop
HALT
(O ption al)
Monitor ePIR
API for Events
Use r
App lica tion
Code
Enter ADC
In ter ru pt
Execute
ePI R_ADC_ISR
Macro
Exit ADC
In ter ru pt
ADC
Interrup t
1 S econd
Timer Interrupt
Set bit 7 of ePIR_SC1
(Engine Timer Tick)
One
Secon d
Time r Tick
Return
Figure 12. Application Flow Diagram, Normal Scan Rate
PS028806-0315
Appendix B. PIR Engine Initialization and Control