circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

November 1997, Issue 88

From the Bench:
Nonintrusive Interfacing - Using Kid Gloves


FIRST BREATH

As you can imagine, this interface could be controlled by most any device. It simply needs nine digital outputs. I chose to use a Domino microcontroller to check for signs of life.

The Domino has a floating-point BASIC interpreter with lots of code memory space. I first constructed routines to drive the outputs correctly to enable each of the ten functions the Animator would recognize--move, left, right, up, down, draw, erase, reverse, next, save, recall, animate, erase frame, and erase animation.

Since this is an open-loop system, I wanted to make sure no commands would be missed. Therefore, each function must execute no faster than the minimum time-slot repetition rate (~22ms) or there's a chance it may not be seen. On the other hand, being too slow wasn't a problem since it's legal to hold a button as long as you want.

After each routine was functioning properly, I wrote a test sequence to scan the whole LCD frame. First, simply moving the cursor through the complete frame would give me the minimum time necessary to scan a frame. It would also give me the basic code necessary for navigating a frame.

Next, using this code and alternately drawing and erasing each pixel in a checkerboard pattern, I could see what kind of maximum time was necessary to draw an entire frame. Unlike a television scan, I don't waste time returning to the beginning of each row. At the end of each row, I just drop down a row and draw in the opposite direction.

The minimum time to scan the complete frame is 300 s. When draw and erase commands were added to the scan to produce a checkerboard pattern, the time increased to 360 s.

I figure this could be decreased two-thirds by reducing the control commands from the present in-line calculated port values to the constant equivalents. The minimum calculated scan time based on the minimum time slot repetition rate would be:

40 x 30 x time x 4

which is:

Equation 1