Go to Triangle Digital Support Home Page TDS2020F TECHNICAL MANUAL
Hardware support
Graphic LCDs
Live website search
Enter key words
 

GRAPHIC LCDS

DEFINITIONS

<BIG

( - )

Revector EMIT to use BIGEMIT . Part of <BIG . emit big characters . BIG>

<HUGE

( - )

Revector EMIT to use HUGEEMIT . Part of <HUGE . emit huge characters . HUGE>

<MED

( - )

Revector EMIT to use MEDEMIT . Part of <MED . emit medium characters . MED>

<TINY

( - )

Revector EMIT to use TINYEMIT . Part of <TINY . emit tiny characters . TINY>

AXES

( - )

Put x and y axes on graph

BIG>

( - )

Restore vector. End of structure <BIG . emit big characters . BIG>

BIGEMIT

( c - )

Display 8x14 ASCII char. c at current position

BIGTYPE

( a n - )

Display n 8x14 chars, starting at address, a to cursor position

BLACK

( - )

Draw in black

BOX

( x1 y1 x2 y2 - )

Erase a box given bottom left & top right points

FACTOR

( - a )

Variable containing scaling factor for huge characters

G-INIT

( - )

Initialise LCD into graphics mode

G-WIPE

( - )

Clear all screen

GRAPH

( a n - )

Draw graph of n 16-bit words starting at memory address a

HUGE>

( - )

Restore vector. End of structure <HUGE . emit huge characters . HUGE>

HUGEEMIT

( c --  )

Put large ASCII character c at current position.

MED>

( - )

Restore vector. End of structure <MED . emit medium characters . MED>

MEDEMIT

( c - )

Display 6x8 ASCII character c at current position

MEDTYPE

( a n - )

Display n 6x8 chars, starting at address a, to cursor position

ON/OFF

( - a )

Variable containing black/white status

PEL

( x y - )

Turn on (or off) a pixel at position x,y

RECTANGLE

( x1 y1 x2 y2 - )

Draw rectangle given bottom left & top right points

RULE

( xnew ynew - )

Draw straight line from position in XNOW,YNOW to xnew,ynew

TINY>

( - )

Restore vector. End of structure <TINY . emit tiny characters . TINY>

TINYEMIT

( c - )

Display 3x5 ASCII character c at current position

TINYTYPE

( a n - )

Display n 3x5 chars, starting at address a, to cursor position

WHITE

( - )

Draw in white

WINDOW

( x1 y1 x2 y2 - )

Clear window, framed with rectangle, given bottom left & top right points

XY!

( x y - )

Move write position to x,y

XY@

( - x y )

Current x,y position to stack

XLABELS

( xinc xmin n - )

Label x axis of graph. xinc=increment in number, xmin=min number, n=no of them

XNOW

( - a )

Variable containing x position in pixels

YLABELS

( yinc ymin n - )

Label y axis of graph. yinc=increment in number, ymin=min number, n=no of them

YNOW

( - a )

Variable containing y position in pixels

FILES

#C61830.TDS

Graphics LCDs based on HD61830, but used in character mode

#G1216.TDS

Graphics display Seiko type G1216, 128 x 64 pixels

#G61830.TDS

Graphics LCDs based on the Hitachi HD61830, used in graphics mode

#G6963.TDS

Graphics LCDs based on the Toshiba T6963C controller chip in mixed character & graphics modes

#G1335.TDS

Graphics LCDs based on the Seiko Epson SED1335F controller chip

#GRAFDEM.TDS

(comes with Update Service) Demonstration of: 1. Graphics LCD software 2.  Pre-emptive multitasking 3.  Stepper motor control 4.  PID control routines

#GRAPHIC.TDS

Generic high level graphics routines

#HUGE.TDS

BIG characters magnified by content of FACTOR

#LMG7520.TDS

�-VGA Hitachi LMG7520RPFC or LMG691x series

#EXTMESS.TDS

Packed message strings stored outside dictionary

#MESSAGE.TDS

Packed message strings with index

HARDWARE

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

Graphics LCD connections
Click the diagram for more detail, or to save a copy:
1. in Internet Explorer right click on the picture and select "Save Target as..."
2. in Netscape double-click the picture to open the file, then under "File" select the "Save As" option.


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.

 

FUNCTION

EXAMPLE

Initialise display

G-INIT

Open Window

12 12 120 31 WINDOW

Position cursor

18 18 XY!

Write BIG text

<BIG .( Hello!) BIG>

Write MEDium text

<MED .( Hello!) MED>

Write TINY text

<TINY .( Hello!) TINY>

Draw in white

WHITE

Blank window

13 13 99 30 BOX

Draw in black

BLACK

Line drawing

15 60 RULE   2 2 RULE

Single Pixel Frame

5 5 50 50 RECTANGLE

Black filled box

BLACK 40 40 60 60 BOX

Box drawn in white

WHITE 45 45 50 50 BOX

Clear screen

WHITE WIPE

Draw graph

0 40 GRAPH

Label axes

1 0 10 XLABELS   2 0 6 YLABELS

 

Change .( Hello!) to ." Hello!" when you include it in a definition.

MORE THAN ONE GRAPHICS LCD

Multiple Graphics LCDs

Multiple Graphics LCDs
Click the diagram for more detail, or to save a copy:
1. in Internet Explorer right click on the picture and select "Save Target as..."
2. in Netscape double-click the picture to open the file, then under "File" select the "Save As" option.


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

SUMMARY

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.

HARDWARE

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.

 

Type Number

Size

Pixels

Backlight

Colour

Technology

 

(mm)

 

 

 

 

LMG6910RPGR

120 x

320 x

reflective

black

FSTN

 

90

240

 

on grey

 

LMG6911RPBC-00T

120 x

320 x

CFL

blue

STN

 

90

240

 

on white

 

LMG6912RPFC-00T

120 x

320 x

CFL

black

STN

 

90

240

 

on white

 

LMG7520RPFC

100 x

320 x

CFL

black

STN

 

75.5

240

 

on white

 

 

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:

 

TDS2020F

38mA

LCMEVB-001 Controller board

95mA

LMG7520RPFC black & white display

8mA

Backlight (2 settings)

232/288mA

SOFTWARE

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 TDS2020Expert Adrian Mills at http://www.summitelectronics.co.uk/pages/downloads.

Go to Triangle Digital Support Home Page Go to top   Next page