R/C Lap Timer/Counter
step is to use the “CONFIG GRAPHLCD” that tells the
compiler what pins are connected to the display and what
their functions are. For now, the T6963C and SED type
displays are the only ones supported by BASCOM. A
breakdown of the config statement is as follows:
· TYPE = Pixel x pixel count
· DATAPORT = Data D0-D7 connections
· CONTROLPORT = Designates what port and which
pins are for control signal connections
· RESET = What pin is for the display reset function
· FS = Font selection connection
· MODE = Number of columns for text mode
After the display has been configured, we are ready to
talk to the world. Two main methods of displaying information are the LOCATE/LCD and SHOWPIC statements. The
LCD and LOCATE statements are used for displaying text
that is generated by the onboard character generator, while
the SHOWPIC statement is used for graphics.
Each character fits in an 8 x 8 pixel block that cannot
be changed. The 128 x 128 pixel display that is used for
this project will support 16 rows of 16 characters, for a
total of 136 characters. It is best to clear the display’s
memory with the CLS statement before outputting anything to the screen. I did not want a cursor for this project,
so I turned it off using the CURSOROFF statement. The location of the text is controlled using the LOCATE Y, X statement where Y is the row position and X is the column position; (locate 1,1) will place the text cursor in the upper left
corner. To write some text at the current cursor position, the
LCD statement is used. LCD “HELLO” is used when a string
is to be printed and, if a variable needs to be displayed, LCD
A would print the value stored in A. This is almost too easy!
Showing Some Pictures
Before you can show some art, you must first create it.
All of the images for this project were done using Windows
Paint. The easiest method I found was to set the unit of
measure to “pels,” set the zoom to a large size, and turn
the grid on. The height and width options are then set to
the desired graphic size. A width setting of 128 by a height
setting of 128 will fill the entire display used for this project.
You then start creating an image by using the drawing tools
and saving the file. Once a bitmap has been created, the
BASCOM “GRAPH CONVERTER” tool is used to create a file
that is inserted into the program for displaying the bitmap.
The converted file will have a .bgf extension and must
reside in the same directory as your Basic program. Listing
1 shows how the “$bgf” directive is used to place the file
into the program code. Once the file is in the program and
a line label is assigned, the “SHOWPIC X, Y, LABEL” is used
to reveal your work of art. X is the horizontal point and Y is
the vertical point used to locate the upper left corner of the
Learn at home in your
Earn up to
$100 an hour
No previous experience needed!
You can earn more money
if you get an FCC License!
Not satisfied with your present income?
Add prestige and earning power to your
electronics career by getting your FCC
The Original Home-Study course prepares you for the “FCC Commercial
Radiotelephone License” at home in your
This valuable license is your professional
“ticket” to thousands of exciting jobs in:
Communications, Radio-TV, Microwave,
Maritime, Radar, Avionics & more…you
can even start your own business!
No need to quit your job or go to school.
This proven “self-study” course is easy,
fast and low cost!
GUARANTEED TO PASS – You get your
FCC License or your money will be refunded.
Call for FREE facts now!
(800) 932-4268 Ext. 220
FCC LICENSE TRAINING - Dept. 220
P.O. Box 3000 • Sausalito, CA 94966
Please rush FREE details immediately!
City State Zip
Circle #138 on the Reader Service Card.