
BOB-3 Version 3.4 Application Guide ~ Copyright © 2004 by Decade Engineering ~ Page 13
Programming Example:
Here’s a simple QuickBASIC
tm
programming example:
' BOB-3 Test Program ....Provides a very brief exercise....
OPEN "com1: 9600,n,8,1,cs0,ds0,cd0,op1000,rs" FOR OUTPUT AS #1
PRINT #1, "{A17"; 'Clear the screen, in case we've been playing
PRINT #1, "{C1101"; 'Print title in center of 2nd line...
PRINT #1, "BOB-3 Test Program"
PRINT #1,
PRINT #1, "Time: "; TIME$
PRINT #1, "Date: "; DATE$
PRINT #1, "{U0{D0" 'Set background attribute for RAM & ROM chars
PRINT #1, "RAM characters are next... ";
PRINT #1, "{T4"; 'Prepare to print a few RAM characters
PRINT #1, CHR$(0); CHR$(1); CHR$(2); CHR$(3); CHR$(4); CHR$(5); CHR$(6);
PRINT #1, CHR$(33); CHR$(34); CHR$(35); CHR$(36); CHR$(37); CHR$(38);
PRINT #1, "{T0" 'Return to normal ASCII translation mode
CLOSE #1
END
Note that RAM character codes were entered as decimal values in this example, but hex values are given as labels
in the Default RAM Character Set illustration above. See
for additional application
programming examples.
Troubleshooting
If BOB-3 appears unresponsive or confused:
Be sure to enter complete commands. It’s easy to forget the termination characters required with
{N
and
{VW
, or to
send insufficient data after a
{P
command, etc. Mistakes like this can be especially confusing if they occur in a boot
script! Rogue boot scripts can be cleared by holding pin 15 low as power is applied, even if BOB-3 is unable to
communicate properly with the host computer. Pin 15 is normally used to drive a video input status indicator.
Note:
Starting with firmware version 3.3, pin 15 is tested at power-up time and immediately after an
{R
command is
received. During initialization, pin 15 is an input with internal pullup resistance of 20k~50k ohms. If this pin is pulled
below the logic low input threshold during those times, the boot script clear routine will be invoked! The routine
takes about five seconds to execute, and a confirmation message is sent to the host upon completion.
If the overlay doesn’t fit your monitor screen:
BOB-3 displays up to 17 lines of characters in both NTSC and PAL versions. The NTSC version, however, leaves
little guard space at screen top and bottom, which could cause portions of these lines to be masked by video
monitors that overscan excessively. If this happens to you, consider two possible solutions: [1] Don’t write anything
to line 0 or line 16. [2] Shift the overlay position downward with the
{HV
command and don’t use line 16. The PAL
version could exhibit the opposite problem, in that excessive guard space appears above the top line and below the
bottom line of displayed text. The best that can be done in this case is to move the overlay position up or down,
allowing text to come closer to screen top or bottom but not both.
The new
{1S
command added in firmware version 3 may be used to adjust display width if necessary. Use
{HH
to
correct horizontal centering if you alter display width.
If the text overlay isn’t stable:
Overlay jitters can be caused by weak and/or noisy video applied to pin 30. Typically, the video signal has been
attenuated by passage through a long cable (or double termination). The best cure for long cable woes is a robust