English
Language : 

Z8FS021 Datasheet, PDF (66/68 Pages) Zilog, Inc. – Select from an assortment of lenses and pyroelectric sensors to best fit your application
ZMOTION® Intrusion Detection
Product Specification
58
The flow diagram shown in Figure 13 displays the general software operation for Low
Scan Rate mode.
RES ET
Initialize Oscillat or & WDT
Set up GPIO’s for application
ePIR
Initialization
Init ialize Flash Frequency Register
Enable ADC in PWRCTL0
I nitialize API Registers
Recommended settings supplied in
lens /pyro configuration file
PIR S can R ate = 1
Set ePIR_Enable Register to
e PI R_ ENAB LE _P ATTERN
Execute EPIR_INI T Macro
Set up Timer for 5 Millisecond Interrupt
Enable Global Interrupts
Ap plicat io n
Initia liza tion
Wait for P IR Sensor Stable
ePI R_SC0 :0 =1
Main
Appli ca tion
Loop
HA LT
(Opt ional)
Monitor ePIR
API for Events
Enter A DC
Interrupt
Turn off ADC to
Conserve Power
Exit ADC
Interrupt
ADC
Interrupt
5 Millisecond
Timer Interrupt
Start next ADC
Sa m ple
E xecu te
EPI R_ADC_I SR
Macro
5 Millisecond
ADC Scan
No
1 Second?
Ye s
Set bit 7 of ePIR_SC1
(Engine Timer Tick)
One Second
Timer Tick
User
Ap plicat io n
Code
Re tu rn
Figure 13. Application Flow Diagram, Normal Scan Rate
PS028806-0315
Appendix B. PIR Engine Initialization and Control