
Introduction.
We are offering a 20X4 serial LCD unit for $54 and $59. These are fully assembled and tested units in a neat package measuring 3.75 inches X 2.0 inches X 1 inch.
The units include a printed wiring board, the serial controller and all the required components mounted on the back of a 20X4 LCD panel.
These are assembled "PIC-an-LCDs" which are currently marketed in kit form by BG Micro. However, they have been modified for use by PIC and Stamp enthusiasts and the units have been assembled and tested.
They may also be used with a PC Com Port or with our 8-Channel Temperature Measuring System.
The LCD panel is not backlit. If back lighting is a must, other vendors have a unit for $89.
The baud rate is limited to 9600. The unit automatically adjusts to accommodate either inverted or noninverted data.
Models.
Two models are offered;
5.0 VDC Model ($54.00). This is intended for PIC and Stamp users who can provide a +5.0 VDC source at 75mA maximum (see below). Power is provided via a pair of 18 inch 22 awg wires. RX_DATA and GRD are provided via a DB-9 female connector on the LCD unit.
The unit uses a series positive temperature coefficient thermistor and shunt 6.1 Volt zener to protect the unit from accidental applications of voltages to +12 VDC and down to -12V. The idea is that when +12V or -12V is accidentally connected to the unit or the +5V and ground are reversed, the shunt zener conducts, the PTC thermistor heats and acts as a fuse which automatically resets when it cools.
This is a big plus for hobbyists in eliminating the situation where one casual mistake in applying power can result in loss of your substantial investment.
120 VAC Model ($59.00). This might be used in situations where a source of +5.0 VDC is not available. This consists of a wall transformer and a power connector and 78L05 regulator on the LCD unit.
Aside from this power option, the units are identical.
With both units, the accidental application of +12 V to -12 V on the RX_DATA lead will not cause permanent damage.
Thus, with these units, there is a lot of room for the kind of errors I all too often make.
Modularity.
Unlike other units, these are modular. That is, the LCD panel is attached to the printed wiring board using a connector and may easily be removed by removing four screws. This permits the experimenter to make modifications to tailor the unit to their application.
The PIC (18-pin DIP) is also socketized. I am hopeful that with the over voltage and reverse polarity protections we have provided you will not burn it out. But, just in case, it may be replaced.
Speaker.
The unit includes an on-board speaker which provides a burst of 1000 Hz tone when the character ctrl-g ($07) is received.
A simple Basic Stamp 2 program that causes 10 beeps.
FOR N=1 to 10 SEROUT 0, 84, [$07] ' $07 is the same as ctrl-g PAUSE 100 NEXT
General Purpose Outputs.
In addition to providing powerful LCD functionality, five general purpose outputs are provided.
Four are PIC outputs which may assume either a logic zero or one (near zero and near +5.0 V) and may sink or source 20 mA. These are normally at logic zero.
The units are shipped with a 4 LED right angle assembly that enables you to monitor the state of these outputs. In addition, four pairs of terminals, each pair consisting of a PIC output and ground are provided to enable you to interface with external peripherals such as alarms, solenoids and AC relays using suitable transistors, FETs or optoisolators.
A sample routine that cause the least significant bit to toggle on and off ten times;
FOR N=1 TO 10 GP_OUT.BIT0 = 1 SEROUT 0, 84, [$15, GP_OUT] ' $15 indicates general purpose out PAUSE 200 GP_OUT.BIT0 = 0 SEROUT 0, 84, [$15, GP_OUT] NEXT
In addition to these four general purpose outputs, the PIC output associated with the speaker may also be used to control an external peripheral in place of controlling the speaker. (Recall that the experimenter can quickly access the printed wiring board.) This output, bit 4, is an open collector and is normally open.
Special Characters.
This unit is definitely a much better mousetrap. With many units, the LCD simply prints control characters. That is, on receipt of the new line character sequence ($0D, $0A), strange characters appear on the LCD as opposed to what one would expect; the cursor moving to the extreme left on the next line.
This unit provides the richest set of special characters I have seen.
Consider the following Basic Stamp 2 program.
T VAR BYTE
P VAR BYTE
N VAR BYTE
DIRS = $0001 ' make P0 an output
TOP:
T = 74 ' dummy up some variables
P = 30
SEROUT 0, 84, [$0C] ' clear the LCD and locate cursor to upper
PAUSE 1000 ' left
SEROUT 0, 84, [$19, $01]
' define cursor as blinking block
' $00 is no cursor, $01 is blinking block
' $02 is underline, $03 is blinking block
' and under line
PAUSE 1000
SEROUT 0, 84, ["Hello", $0A, $0D]
' $0D - move cursor to extreme left
' $0A - move cursor to next line
SEROUT 0, 84, ["World", $0A, $0D]
SEROUT 0, 84, ["T=", DEC T, $09, "P=", DEC P, $05, $0A, $0D]
' display some variables, $09 is tab
' $05 is save cursor
SEROUT 0, 84, ["Rochanda", $06]
' print some more text on line 4
' restore cursor to the end of line 3
PAUSE 4000
SEROUT 0, 84, [$19, $00] ' disable cursor
FOR N = 1 TO 20 ' twirl a wheel
SEROUT 0, 84, 50, ["|", $08, "/", $08, "-", $08, "\", $08]
NEXT ' $08 is non destructive back space
PAUSE 4000
SEROUT 0, 84, [$0D, $0A] ' new line
T=$81
SEROUT 0, 84, 1000, [$16, T, $09, $17, T]
' prints T as signed quantity (-127) and as unsigned (129)
PAUSE 4000
FOR N=1 TO 5
SEROUT 0, 84, 300, [$0F] ' $0F is shift right
NEXT ' pull the whole display to the right 5 places
FOR N=0 TO 6
SEROUT 0, 84, 300, [$0E] ' $0E is shift left
NEXT ' pull the whole display back to the left
PAUSE 4000
SEROUT 0, 84, 100, [$0B, $0B] ' two vertical tabs
PAUSE 4000
FOR N=1 TO 5 ' beep the speaker 5 times
SEROUT 0, 84, 100, [$07]
NEXT
FOR N=0 TO 15 ' output to the General
Purpose
SEROUT 0, 84, 100, [$15, N] ' Outputs
NEXT
SEROUT 0, 84, [$15, $00] ' turn GP Outs off
PAUSE 4000
SEROUT 0, 84, [$0C, "BEST WISHES", $0A, $0D]
' clear LCD and output message
SEROUT 0, 84, ["73", $0A, $0D]
DONE: GOTO DONE
In addition to all of the special text characters illustrated above, commands and data may also be sent directly to the LCD panel as is currently done with the poorer mousetraps on the market. Among other things, this permits the display of user defined characters.
PC Interface using a Terminal Emulator.
Although I see the greatest utility for this LCD package in a Stamp or PIC environment, it may also be used with a PC Com Port with programs written in QBASIC or C or others.
However, it may also be used with such terminal emulator packages as HyperTerm or Procomm. One might use this capability for experimentation or use the general purpose outputs to control the basement or outdoor lighting from your keyboard by typing various ctrl characters.
Other Features.
The unit includes a potentiometer which is readily accessible for varying the contrast of the LCD. A female DB-9 connector and "ON" LED are included. A reset switch is also provided.
In a PIC or Stamp environment, it may be desirable to use the PIC or Stamp to reset the LCD, as opposed to the manual reset. This may be done by removing the LCD panel and connecting a wire to the node of the manual rest switch and the pull-up resistor. The unit may then be reset by using a Stamp output to momentarily bring this lead low.
In application where power consumption is critical, a Stamp or PIC output may be used to provide the +5V power to this unit. You may wish to remove the "ON" LED and the LEDs associated with the general purpose outputs, and here again, you may quickly do so by removing the LCD panel from the printed wiring board and unsoldering the components or opening the series 330 Ohm resistors.
Summary.
All and all, this is a powerful and yet comparatively inexpensive unit.
It is fully assembled and tested and ready to go. Sample BASIC Stamp 2 and PIC code are provided along with sample text that may be entered using a PC keyboard. There is no need for an extra $30 package to get you quickly started.
Care has been taken to protect the unit from permanent damage by accidentally applying the incorrect voltage or reversing polarity and this is an extremely important feature for a hobbyist who has limited resources and it is to my knowledge a feature which is unique to this unit.
The use of control characters to provide such features as newline, horizontal and vertical tab, back space, clear the display, set the cursor type, save and restore the cursor position and shift the display left and right make it the most functional LCD package I am aware of.
Four general purpose outputs are available. A fifth may either be used to control a speaker which is provided or as a general purpose open collector output to control external peripherals.
You can take the unit apart and customize the printed wiring board for your application. I have provided a few examples; providing a reset lead and removing LEDs to reduce power consumption. Surface mount technology is great as it allows you and me to buy low cost PCs and cell phones in nice compact processors. This printed board doesn't use surface mount technology which is useful for the hobbyist as it permits you to modify the circuitry with very simple tools.
Final Notes.
The processor used in these units is the "PIC-n-LCD" marketed by BG Micro. This should not be confused with our $9.95 serial LCD kit which includes our own PIC. The two PICs are not interchangeable. We will continue to sell our serial LCD kit for experimenters who prefer to build from scratch and can supply their own LCD panel.
These units are assembled and tested by my students. I then inspect them, verify they are operational and as with all of our items, I unconditionally guarantee them. If you are not satisfied for any reason, simply send it back for a full refund.
Without beating around the bush, most of my students are financially poor and they work all kinds of menial jobs flipping burgers or sorting luggage or guarding liquified natural gas plants which of course leads to poor academic performance. Each day, I see a lot of bad decisions being made over very small sums of money.
The sale of each of these units permits me to pay a student for three hours to look at some technical problem related to embedded processor control. Hopefully, I sell more than a few :).
There is some rough PIC code on my
page for my current Microcomputer Applications course.