Thursday, November 13, 2008

Sitting Bouncing On Stomach

use a graphical display

Many of you surely know the 2 x 16 alphanumeric display, also known as "two rows sixteen characters," or simply "HD44780" in the name of the controller typically adopted.


On the web there is plenty of material about the piloting of these displays, which is actually quite simple.
In a few words and 'just send the data line codes corresponding to characters to be displayed, using the appropriate control signals specifying the position of the characters, the blinking cursor, scrolling text etc. possible.
Clearly, a display of this type is suitable for display exclusive of letters and numbers, and even when they have a pretty good choice of symbols (bar, special characters, etc.). Any attempt to display "graphics", such as a slider bar or a diagram, it becomes a compromise between visual quality and the choice of the symbol more intuitive. And 'in fact can not display an image.

In this regard, for some time made their pop-up graphic displays, or dot matrix, where the viewing area is evenly covered with pixels.
The resolutions are relatively high, ranging from 64 x 64 display of mobile phones, passing for 128 x 64, 128 x 256 etc.. up to VGA display with 640 x 480 pixels and above.

As is intuitive, can drive these displays is more complex than the text of the 44780 protocol, but the structure is basically the same: the string of alphanumeric characters of 44780 is simply replaced by a set of vector coordinates, to be managed properly by control signals. In most cases, just send the sequence to the display on and off of individual pixels, sweeping the entire surface. A little 'as you would fill an array box to box, in groups of eight bits at a time.

If the display is connected to a computer, the image preprocessing must be handled by the software of an aircraft, but the amount of programs already written for this specific function makes the task quite easy.
If you work with a microcontroller, the work is further simplified by the abundant presence of appropriate software packages and libraries, to paste directly into your code.

The display in question.
I was able to deal with this when I found a display PG12864A, recovering from a handheld PC industrial (recovered the old crap, and at no cost!) when I saw him taken a relentless curiosity that led me to a first approach based on the port by PC (in fact it is the easiest and fastest way to exploit the graphical display of some complexity like this).

Technically PG12864A and 'just another display of 128 x 64 pixels based on the KS0108 controller, widely used and tested.

Here is a picture of the display, before:


and behind:

You immediately notice the presence of a row of 20 contacts. From datasheet of the display and 'immediately guess the similarity with the classic pin-44780; in fact the only differences relate to some hardware control pins.

interface with your computer.
the most 'direct and easy way to display and use these' parallel interface (unidirectional, although SPP is fine) to a desktop computer, not only for the limited hardware needed, but for the most simplicity 'in the management and content management software. Assuming an implementation on a microcontroller in fact, must necessarily be out on a substantial amount of memory in which the frame and keep all the pictures!
PC connection also allows the display of the content more 'different, notes interfaces for winamp network status, the temperature inside the PC using the RAM, just to name a few.

Basically the scheme to be implemented follows this example:



WARNING: The diagram shows a generic way to pin the display, on completion, you should check the actual pin-out of its display, and provide any adjustments.

You notice the absolute simplicity of this solution, which provides an immediate and direct connection between the pins of parallel port and the corresponding pin of the display.
Obviously this is 'the best solution' rudimentary; I personally have made an interface using the very well known 74LS245, Octal bidirectional buffer, which for this application are in fact a little 'wasted.

Also note the presence of a pin labeled "Vout". Well, by that pin comes out a negative voltage of approximately-10V, which is generated internally by the electronics of the display, which is needed to power the LCD panel. Using a trimmer
10Kohm between this pin and ground, before returning to the pin "Vo" is obtained by adjusting the contrast.

to connect to the parallel port I used a 20-pin flat cable, and that 'proved particularly versatile and reusable for future projects.


Inside:



To display connection, I used 40-pin IDE interface, they use only half, but the practice 'of this solution is unrivaled.
to complete the work I added a 7805 regulator and trimmer for contrast on the same card. The 40-pin IDE interface I can be useful to make an interface for both alphanumeric and graphic displays, using just the two rows of contacts at a time.
will improve in the future 'interface for alphanumeric.

The interface card then so is' be:

Since the card
spacers, the rear and 'very popular in fact work more' long 'was the wiring to the various connectors:


The work will not be' clean but it 's very robust and versatile. This gives rise to the natural light on the choice of buffer. Some might ask: why not use the 74LS244 ? Looking at the datasheet, and in particular the effective provision of internal buffers, the answer is' obvious: '245 in the buffer are all aligned, and the adjacent 8-pin can be assigned to all input or output, while in the '244 you the alternation of an input with the output of the pin opposite.

I initially made an attempt (also works) for the use of 244, with this result:


Confusion reigns. I confess I had not expected such a tangle of connections, the use of a 74LS244 and 'practical benefit only in the case of PCBs specifically designed, or where it is used in a "cross", ie the inputs in the head and exits at the foot of the chip, in order to avoid too many overlaps.

The overall interface is so 'made:


software.
For the management of these displays are numerous software, more 'or less' homemade'. Personally I used LCDHype ( Home ), I found it quite intuitive and feature-rich pre-compiled for those (like me) did not really want to be there 'to plan! There are other programs
more 'specific, for example interfaces shown Winamp. Most

'Note:
LcdStudio, similar to LCDHype: Home
Microchipc, for libraries to download the PIC microcontroller series: Home
LCDSmartie, more' suitable for alphanumeric displays eg. 4 x 40: Home

An interesting article about the Ubuntu-known program jaLCDs: Article .

Examples of operation.

interface for Winamp:


bar interface, always for winamp:


Displaying an image:



A analog clock:




All images are visible in high resolution on PICASA .

0 comments:

Post a Comment