|
The Easy Way
by Charles Kosina
Start ý An
Example ý State Machine Control ý Keyboard
Scanning ý Receive Serial Data ý LCD
Module ý Transmit Data ý Debugging
Techniques ý Other Options ý Sources
and PDF
OTHER OPTIONS
I started with the Z180, so I may as well
finish with it. Derivatives of the Z180 seem to be the flavor of the
month again, and Listing
7 shows how the jump table can
be implemented for this processor. Try the same technique for your
favorite micro, although youýll find that some of the simpler chips
donýt have the addressing modes for this approach.
The example I used in this article is
trivial but serves to illustrate the technique. Most applications
have 20 or more states in their state machine, but the principles
remain the same. Other tasks such as reading I/O ports, getting data
from an ADC, or sending data out to a DAC can be easily added as complete
blocks. As long as you follow the rules, other tasks that are already
debugged should not be affected.
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. |