|
by Peter Gibbs
Start ý The
Objectives ý Circuit Operation ý Decoding
the URIC ý Short Program ý The
Multiplexer Design ý Software ý Sources
and PDF
SOFTWARE
Listing
2 (IR.BAS) is the final
program downloaded to the Stamp. It polls bit 7 for a low pulse to
determine if a button is pressed. If no button is pressed, it checks
to determine if the system is in scan mode or locked onto a specific
channel and then takes appropriate action.
The main limitation of the design was
the lack of an interrupt, which would allow instant recognition of
button activity. Unfortunately, a button pressed during the 3-s sleep
period is ignored. As a result, during the polling stage, you must
hold down a button until it is recognized. This is only necessary
during scan mode.
To save precious memory, variable b0
is reused as a garbage variable when pulses are read in. Bit values
not necessary for decoding are discarded. Finally, it is used to calculate
the button value. This value is then stored in variable b3, and the
Lookdown command is used to load pins. The statement PULSOUT 5,
5000 beeps a buzzer for audible indication of channel change,
and PULSOUT 4,5 clocks the latch.
The complete schematic of the system
is shown in Figure 3. I take
the composite video output to a small video transmitter, set it to
Channel 13, and view the display on a small TV in my office.
For power, I use a standard ± 5-VDC
power supply from our digital electronics labs; demand is small and
any supply capable of 500 mA will suffice.
I am sure you can improve and simplify
my program, which was written to merely get the system operational.
Iýve provided a parts
list of the items I used in
the system. So far, the system has worked, and itýs been in use since
August of 1999.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |