
Configuring the élanSC300 Device’s Internal CGA Controller for a Specific LCD Panel
13
LCD DEVELOPMENT TIPS & TRICKS
Use CTTY for Console I/O
When using an LCD as the console device under DOS,
there may be problems debugging the LCD because
DOS will also be attempting to write to the LCD through
the BIOS. A way around this is by diverting the DOS
console I/O through the serial port. This allows use of
debug or other application programs to access the
élanSC300 microcontroller’s registers and view the re-
sults on the LCD display. The following steps are rec-
ommended:
1 Connect a null modem cable between COM1 on the
élanSC300 microcontroller and a PC running PRO-
COMM or other terminal program. (A lap link serial
cable is a null modem cable).
2. On the PC running PROCOMM, set up for a direct
connect to the serial port, running 9600 baud, 8
data, 1 stop bit, and no parity. Set it up for a terminal
type of either TTY or ANSI-BBS.
3. On the élanSC300 microcontroller system, boot
DOS and have the following commands in the
autoexec.bat
file:
– mode com1 9600,n,8,1
– ctty com1
4. After the system boots, the DOS prompt will be vis-
ible on the PC running PROCOMM.
5. Executing programs that use the console I/O such
as debug should be possible.
6. Programs that talk directly to video memory will dis-
play the output on the élanSC300 microcontroller
system, but the keyboard input will come from the
PC running PROCOMM.
7. Below are two things to keep in mind:
– To debug an LCD, the élanSC300 microcontrol-
ler evaluation board should be configured for In-
ternal Video mode
– If using Phoenix BIOS, the BIOS will lock the
Video Index registers. Remember to unlock
them by reading Video Index 12h. The BIOS will
also lock the upper 16K of display memory,
which is used for font storage in Text mode. This
can be unlocked by clearing bit 3 of Video Index
20h.
The BIOS May Also Be Updating the Screen
If using the élanSC300 microcontroller evaluation
board with an LCD standalone, (i.e., not option 1
above) and booting to DOS, note that the BIOS is ac-
cessing the Video registers every time it is called to up-
date the screen (i.e., typing in debug or from the DOS
prompt). If trying to use debug or other programs to
modify the Video registers, be aware that they may be
modified by the BIOS as well, specifically Ports 3D8h
and 3D9h.
Using Standard CGA or HGA Drivers on a
Nonstandard Display Size
It is possible to use standard CGA or HGA drivers on a
nonstandard-sized screen. The method is to program
the élanSC300 microcontroller with values for the LCD
width that match those that the driver expects. The
LCD height can be set to the actual LCD height. This
will cause the video SRAM to be organized as the stan-
dard driver is expecting. The LCD panel will be display-
ing the upper left of a virtual screen.
Trademarks
Copyright 1997 Advanced Micro Devices, Inc. All rights reserved.
AMD, the AMD logo, combinations thereof, and élan are trademarks of Advanced Micro Devices, Inc.
Product names used in this publication are for identification purposes only and may be trademarks of their respective companies.