beautypg.com

Zilog Z8FS021A User Manual

Page 17

background image

UM023302-1214

13

ZMOTION

®

Intrusion Detection Development Kit

User Manual

Making Changes to the ZMOTION_Intrusion_Demo Project

To change the duration of the LED on time, observe the following procedure.

1. Change the following line in the

main.c

file:

unsigned int cMDDelayTime = DELAY_1SEC;

// LED ON time

2. Change the line as follows to select a five-second LED on time:

unsigned int cMDDelayTime = DELAY_5SEC;

// LED ON time

LED on time

definitions are provided in the

main.h

file for values from 200 ms to 30

minutes.

3. Click the

Rebuild

icon to build the project. The build output should not indicate any

errors. Click the

Go

icon to download the modified project and start the application

running. Generate motion and notice that the LED now stays on for 5 seconds.

4. To change the lens used by the project, edit the

include

line at the top of the

main.c

file to include the appropriate

API_INIT

file. The project initially uses

API_INIT_09.h

to support the ZWA12GI12V4 (board clip-in) lens (see the code

sample below). To use a different lens, edit out the comment characters (//) in the

main.c

file that correspond to the new lens, and comment out the lens that is no longer

in use.

replace with:

// This file must match the lens and PIR sensor used in the application

//#include "API_INIT_00.h"

// Generic settings: non-lens-specific

//#include "API_INIT_01.h"

// API configuration file for AA 0.9 GI V1 Lens

//#include "API_INIT_02.h"

// API configuration file for CM 0.77 GI V3 Lens

//#include "API_INIT_03.h"

// API configuration file for CM 0.77 GI V5 Lens

//#include "API_INIT_04.h"

// API configuration file for CWM 0.5 GI V1 Lens

//#include "API_INIT_05.h"

// API configuration file for NCL-9(26) Lens

//#include "API_INIT_06.h"

// API configuration file for NCL-10IL Lens

//#include "API_INIT_07.h"

// API configuration file for NCL-3B Lens

//#include "API_INIT_08.h"

// API configuration file for NCL-11 Lens

#include "API_INIT_09.h"

// API configuration file for WA1.2 GI 12 V4 Lens

//#include "API_INIT_10.h"

// API configuration file for LR1.2 GI 12 V3 Lens

//#include "API_INIT_11.h"

// API configuration file for VB1.2 GI V1 Lens

The

API_INIT

file must match the lens and pyroelectric sensor being used on the Devel-

opment Board. Use the Lens Selection Guide in the ZMOTION Lens and Pyroelectric
Sensor Product Specification (PS0286) to determine which API_INT file is required for
each lens and Pyroelectric Sensor combination.

Note:

This manual is related to the following products: