successful compile is performed
■ PHOTO 4. The E3mini is supported by a pair of quad DIP
headers. The top voltage rail is five volts, while the bottom
voltage rail is at 3. 3 volts. The 3. 3 volt voltage rail supplies
the Zilog motion detector.
wiring a ZMOTION module is a walk in the park. Our
ZMOTION module is wired to operate in hardware mode.
■ SCREENSHOT 1. The serial input/output monitor is a
terminal emulator application that is included with the
CCS C Compiler package. In the case of the E3mini, the
terminal emulator is automatically kicked off each time a
The logic levels on pins 3 and 4 of the ZMOTION module
set an active-low motion detected output pulse of two
seconds at maximum sensitivity.
We know that the ZMOTION module operates at
E3mini’s rubber foot. This provides a stable E3mini
platform when the USB cable is connected to the E3mini.
+ 3. 3 volts. So, we will take advantage of the E3mini’s + 5
volt voltage rail which is supplied via the VBUS pin of its
Our E3mini motion sensing application will build upon
the LED code we have previously written.
USB interface to supply power to our ZMOTION module.
All we need is a simple + 3. 3 volt regulator that takes its
input voltage from the E3mini + 5 volt source.
The voltage regulator design is outlined in Schematic
3. The actual voltage regulator circuit is smiling for the
Canon in Photo 3. The + 3. 3 volt regulator is built up on a
three-pin SIP header. The 10 µF filter caps are soldered to
the SIP pins.
When the ZMOTION signals motion is detected, we
will have our application code force the E3mini’s trio of
LEDs to count up in binary during the two second motion
detected pulse. We will also use the E3mini’s USB portal
to send an ASCII message to the CCS C built-in terminal
The E3mini’s power pins are arranged in such a
fashion as to perfectly mate to the power rails of a
solderless breadboard. In Photo 4, I used a pair of four-pin
We’ve already laid the application ground work. So,
let’s focus on the code that will actually become the
application enabler. First, we must extinguish the E3mini’s
LEDs and initialize some local variables:
DIP headers to secure the E3mini to the solderless
breadboard. One set of DIP headers is soldered to the
E3mini’s power pins below the female header and supply
+ 5 volt power to the solderless breadboard’s upper power
int8 i; //general purpose loop
int16 motionCnt; //incrementing count of
//motion detected events
The other set of DIP headers is supporting the E3mini
module in a nonelectrical way. The physical support DIP
header is mounted in the solderless breadboard power rail
and supports the E3mini using its pins to pierce the
ledsON(allOff); //turn off the E3mini’s
motionCnt = 0; //initialize the event
54 February 2017