Stamp
The purpose of this code is to display a three-digit
counter in the display, as well as run a little animated
“bug” on the left. The main loop handles the counter.
At the top of the main loop is a smaller inner loop that
uses the Write command to send the counter digits to
the display.
Notice how convenient the DIG operator is for us in
this application. The next section animates the outside
segments of the leftmost display. It’s a very simple
attention getter.
Now that we have data in the SS8
buffer, we need to configure the
display so that digits are shown on
the right and the animated “bug” on
the left.
With LOOKDOWN, we can
determine how many columns the
current count value occupies and,
with that value, LOOKUP will give us
the proper column mode and enable
bytes. This lets us blank leading zeros
and create a more professional looking display.
One of the things that you
probably noticed is that the column
mode and column enable bytes
can — in some cases — be used to
accomplish the same thing.
If I’m being honest, the column
enable feature was a late addition to
the project and this came after a lot
of display experimenting. One technique that I experimented with while
I was developing the code was
prewriting to the display, and then
revealing the display column by
column by updating the column
enable byte.
Well, it’s up to you now. I will
admit that programming the SX —
even with SX/B — can be challenging,
however the rewards are really
worthwhile.
If you use this display project as
a guide, you can build any number of
serial accessories that require
buffered input. But be sure to download the SX documentation for the
Ubicom, and please do check out the
books I told you about; they will really make your journey into SX mastery
far easier.
By the way, please feel free to
contact me at the email address
provided. I look forward to hearing
from Nuts & Volts readers!
JANUARY 2005
Have a Happy New Year! And until next time ... Happy
Stamping. NV
Rejwil
P
wsJo
liam
ar
wwon W
s@
all
.pauillia
para
ax,
rallaxrm
llax
In
.cocs
.co
c.
m em s
Circle #44 on the Reader Service Card.
83