Getting Started with Zilog’s ZMOTION
TM
Development Kit
UM022801-0610
14 of 18
Making Changes to the ZMOTION_Basic Project
To change the duration of the LED on time, change the following line in main.c:
unsigned char cMDDelayTime = DELAY_1SEC; // LED ON time
Change the line as follows to select a 5 second LED on time:
unsigned char cMDDelayTime = DELAY_5SEC; // LED ON time
LED on time definitions are provided in main.h for values from 200ms to 25 seconds.
Click the “Rebuild” icon to build the project. The build output should not indicate any errors. Click on
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.
To change the lens used by the project, edit the “include” line at the top of “main.c” to include the
appropriate API_INIT file. The project initially uses “API_INIT_04.h” to support the CWM 0.5 GI V1
(Board Clip-In) lens.
#include "API_INIT_04.h" // API configuration file for CWM0.5GIV1 Lens
The API_INIT file must match the lens and pyroelectric sensor being used on the Development 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.
TM