There are now three low level graphics driver library files for TDS2020F. They are:
q #G61830.TDS for displays using the Hitachi HD61830 controller chip
q #G6963.TDS for displays using the Toshiba T6963C controller chip
q #G1335.TDS for displays using the Seiko Epson SED1335F controller chip
Displays should use one of these controller chips-preferably built into the display (see LARGE LCD DISPLAYS, page 108 for �-VGA and above). For example the LMG7400PLFC gives 240 x 128 pixels and no interface components to TDS2020F are needed. Graphics displays using other controller chips will need low-level words rewriting but then all higher-level functions should work.
Graphics LCD connections
Note that some graphics LCDs need a negative voltage although others will work on +5V only. Seiko's G1216 is a 128 x 64 pixel display working from +5V only. It is very suitable for portable hand-held instruments.
Backlit versions such as LMG7400PLFC are available for use in dim environments. The diagram shows the connections between the TDS2020F and a typical Hitachi graphics display. The resistor and potentiometer provide a bias that governs contrast. Omit the resistors shown on the data bus lines if not using a keypad.
GRAPHICS DISPLAY SOFTWARE
Support routines for graphics displays are in two levels. Primitives have to be written according to the particular controller chip and are in files like #G61830.TDS, #G6963.TDS, #G1216.TDS and #LMG7520.TDS. In particular there is the word PEL for drawing one pixel. Near the start of these files are constants that fix the horizontal and vertical display size and perhaps other parameters. You should edit the correct values for the chosen display.
Higher-level functions are in the file #GRAPHIC.TDS, included at the end of each of the above files. They build upon PEL and other primitives to give operations needed by applications programmers. There are words for windows, boxes, rectangles, line and circle drawing. It also includes three character fonts. A further file #HUGE.TDS will expand the BIG characters to any size.
Here is a summary of the principal functions. This list is designed to make you familiar with the facilities. Compile the appropriate file (e.g. #G61830.TDS) and then type each example in turn.
Change .( Hello!) to ." Hello!" when you include it in a definition.
MORE THAN ONE GRAPHICS LCD
Multiple Graphics LCDs
Up to 8 graphics LCDs with built-in controller can be driven from the TDS2020F, a different enable signal is needed for each, but all other lines are common.
q Decode address lines A1, A2 and A3 (pin numbers a12, a11 and a10) using a 74HC138 3-to-8 line decoder with negative going outputs.
q Enable the decoder IC at with signal CS8180* from the TDS2020F.
q Feed the 8 decoded outputs to the CS pins of the different LCDs.
Like alphanumeric LCDs, variable #LCD directs output to the appropriate LCD.
LARGE LCD DISPLAYS
Liquid crystal displays from �-VGA size up (320 x 240 pixels and over) have a high-speed 4-bit interface. Unlike their smaller brothers, they do not incorporate a controller chip. Library file #LMG7520.TDS contains support software for �-VGA LCDs interfaced to TDS2020F via a controller board.
The LCD controller board LCMEVB-001, one 74HC00 series logic device and a +5V regulator give all the extra circuitry that is needed. The interface board can be bought from Hitachi distributors or Triangle Digital Support Ltd.
The table shows some suitable Hitachi LCDs that need no software changes. Other �-VGA screens from different manufacturers can use the same controller and similar software provided they have a 4-bit interface and use 4 bits per pixel. The size shown is the actual display area. Contact Hitachi for further details.
Detailed instructions and interconnections are in the file #LMG7520.TDS. Resources used on the TDS2020F are:
q Port P10 pin c31 is used to feed a 10MHz clock from the TDS2020F to the LCD controller board. This clocks the state machine in the on-board EPLD.
q Port P92 is used in its PWM Digital to Analog mode to deliver a 1.25kHz signal to the controller. The mark/space ratio controls the LCD brightness.
q The controller occupies the address space hex 80000. to FFFFF. The 32-pin socket holding a RAM, EEPROM or flash chip is swapped out of this area while the controller is being addressed.
These current consumption measurements were made using a TDS2020F, controller interface board and display:
The library file #LMG7520.TDS provides primitive software to draw single pixels and like smaller displays, #GRAPHIC.TDS included at the end of the file gives windowing and other higher level functions.
Up to 6 display frames can be stored in the controller board's memory for immediate viewing. The display can be smooth-scrolled vertically. Each pixel can have any of 16 different densities to give grey scale displays.
Small changes to the initial configuration table 320X240-15GREY and to the word PEL might be necessary for some displays. Colour �-VGAs and full-screen 640 x 480 VGAs use variations of this library file.
PUT DIAGRAMS ON AN LCD
The BMP/DXF to Forth Converter is a tool for converting drawing and image files into compilable ANS Forth code for repoduction on an LCD graphic display interfaced to a TDS2020F card computer.
Draw or import the picture into any drawing program which will export *.DXF files. Export the picture into a file with extension .DXF, for example XMAS.DXF. Alternatively, if this is a picture, not a vector drawing, convert it to a file with extension .BMP. Now use this PC program to write the Forth code. It is available free from TDS2020F Expert Adrian Mills at http://www.summitelectronics.co.uk/pages/downloads.