Products and Services |
The main board includes mounting holes and header locations for the direct connection of an industry standard 4-line by 20-character LCD using the HD44780 controller. It also has component positions for a constant current driver for an LED backlight. (Mounting pillars, headers, etc. are not included with the main board but are part of this option package.)
The table below lists the parts required to add a 4-line by 20-character LCD to the ECROS Technology Prototyping System, including mounting hardware and a software controlled LED backlight. The backlight driver is suitable for unregulated input supplies of 7 to 14 volts and sets a current of 91 mA. For lower input voltages and other backlight currents, modifications will be required as described below.
|
Ref. Des. |
Description |
Source |
Part # |
Qty |
|---|---|---|---|---|
|
LCD1 |
Display |
Item #32 |
1 |
|
|
- |
Header, 16-pin † |
Mouser (page 691) |
517-6111TN |
1 |
|
- |
Socket, 16-way † |
Mouser (page 690) |
517-974-01-36 |
1 |
|
- |
Standoffs, 0.375" ‡ |
DigiKey (page 1009) |
1797DK-ND |
4 |
|
- |
Screws, 2-56, 1/4" ‡ |
DigiKey (page 1011) |
H330-ND |
8 |
|
- |
Washers, 0.062" |
Mouser (page 1015) |
561-D262 |
4 |
|
Q2 |
Transistor, MJE182 |
Mouser (page 305) |
511-MJE182 |
1 |
|
Q1 |
Transistor, 2N3904 |
Mouser (page 305) |
511-2N3904 |
1 |
|
- |
Screw, 4-40, 1/4" ‡ |
Mouser (page 1013) |
5721-440-1/4 |
1 |
|
- |
Hex nut, 4-40 ‡ |
Mouser (page 1013) |
5721-440 |
1 |
|
R9 |
Resistor, 22 ohm |
Mouser (page 380) |
293-22 |
1 |
|
R10 |
Resistor, 1 kohm |
Mouser (page 380) |
291-1K |
1 |
|
R8 |
Resistor, 220 ohm |
Mouser (page 380) |
291-220 |
1 |
|
R2 |
Resistor, 10 kohm |
Mouser (page 380) |
291-10K |
1 |
|
R1 |
Trimmer, 10 kohm |
Mouser (page 413) |
531-N6-S25T0C-10K |
1 |
† The header and socket are cut from longer strips.
‡ Standoffs and screws cannot be bought in these
small quantities.
If kitting for yourself, you can economize by omitting the LED backlight control circuitry. Other, cheaper LCD units may be compatible with the connector, but probably not the mounting holes.
The Display Option Kit is available from ECROS Technology.
Save money! The Gold and Platinum packages include the Display Option Kit and can be purchased at a discount over options selected individually.
Click
this button for general ordering information, shipping charges, tax, etc.
The LCD interface uses GPIO port E for (8-bit) data and PG3, PD2 and PD3 for control. None of these ports have an alternate function. Half of port E can be recovered by operating the LCD in 4-bit mode. If the LCD is not plugged in, all these pins are available for other uses.
To use the display option, 5 volt power must be present on the main board. The Power Supply Option Kit includes a regulator to generate 5 volts from an input of 6 to 16 volts unregulated.
The supply input voltage must be either regulated 5 volts (in which case the 5 V regulator is bypassed) or at least 6 volts. For battery operation, it is likely that three alkaline or four NiMH cells will be close enough to 5 volts to work.
If the display option is used with the main board in a Serpac enclosure, the face of the display can be positioned just inside the top of the case by the selection of suitable standoffs. A rectangular hole can be cut in the case to show the display area of the LCD. Some enclosure models have a recess for a front panel decal in the top.
Complete
information on compatible Serpac enclosures
The display backlight driver consists of transistors Q1 and Q2 and resistors R8, R9, R10 and R13. If you do not want to use the display's LED backlight, do not install these parts. GPIO port PF7, which turns the backlight on and off, will then be available for other uses. You can run a wire to it at one end of R10, marked PF7 on the silkscreen. If you do use the backlight driver, the input voltage to the board should be kept low to prevent excessive power dissipation in transistor Q2. 14 volts would be the maximum for the standard build option described below.
So that the display backlight brightness is not affected by the power input voltage, the standard build provides a constant current drive circuit. The current is set by R9. The microcontroller drives the base of U1 to 3.3 V. About 1.3 V is dropped from here to the emitter of Q2 so the voltage across R9 will be 2.0 V. The following table gives the required value of R9 for various backlight currents.
|
R9 |
Backlight Current |
Power in transistor Q2 |
|||
|---|---|---|---|---|---|
|
ohms |
power |
9 V input |
12 V input |
15 V input |
|
|
22 |
182 mW |
91 mA |
273 mW |
546 mW |
819 mW |
|
13 |
308 mW |
154 mA |
462 mW |
924 mW |
1386 mW |
|
8.2 |
488 mW |
244 mA |
732 mW |
1464 mW |
2196 mW |
When selecting R9, make sure you use a suitable power rating. Also, so not exceed the maximum current of the display backlight. This is typically at least 250 mA for a 4-line by 20-character LCD.
Resistor R13 provides a means of reducing the power dissipated in Q2 if you are using a high voltage to power the board and/or a high backlight drive current. The table above shows the approximate power in Q2 with various supply voltages. The voltage across the backlight LEDs will be about 4 volts and R9 drops 2 volts as shown above. At 12 volts input, for example, Q2 therefore has 6 volts across it. At one watt, Q2 is going to be too hot to touch. One-and-a-half watts is almost certainly too much.
Suppose you plan a backlight current of 200 mA and will supply the board from a voltage that is nominally 12 volts but may go as low as 10 volts. R9 will be 10 ohms (2.0 volts / 0.2 amps) and must have a power rating of ½ watt or higher. At 10 volts input, 4 volts must be dropped by Q2 and R13, that is 10 (input) - 4 (LEDs) - 2 (R9). If we give R13 a value of 15 ohms it will drop 3 volts, leaving 1 volt for Q2 which is plenty to keep it operating properly. R13 must be a 1 watt resistor as its power dissipation is 3 * 0.2 = 0.6 W. Now, when the input is the nominal 12 volts, Q2 and R13 must drop 6 volts which increases the voltage of Q2 to 3 volts. Its power is then 600 mW. Although it will get quite warm, this is OK and the design is acceptable. Should the input voltage rise to 15 volts, Q2 will dissipate 1.2 watts and get very hot, which is not recommended although it probably won't actually cause Q2 to fail.
Since the Prototyping System will run from inputs as low as 6 volts, the easiest thing to do is to avoid high input voltages. If the power dissipation in Q2 is not a problem, R13 should be installed as an insulated wire link. However, for input voltages below 7 volts, see below.
The purpose of R10 is to limit the base current of Q1 in the event that constant current operation fails due to a too low supply voltage. The current gain of Q1 and Q2 combined is such that the voltage drop across R10 is insignificant. R8 similarly limits the collector current of Q1 if constant current operation fails. At 250 mA, Q2 has a minimum current gain of about 40, so Q1 needs to supply about 6 mA of base current to it. R8 drops more than a volt, but since it is connected to the anode of the backlight LEDs, this does not put Q1 anywhere near saturation.
The constant current driver requires an input voltage of at least 7 volts to operate correctly. This is because in addition to the voltage across the LED backlight itself, 2 volts is needed across R9 to establish constant current operation and at least half a volt is needed across Q2. At high current, the LEDs may drop 4.4 volts, see the display data sheet for exact figures. All that will happen if the input voltage is too low is that Q1 and Q2 will saturate, the current will fall off and the display will dim. However, if you know you will only use low power input voltages and you want a bright backlight, it may be better abandon constant current drive.
To use a resistor to set the backlight current, install this resistor as R13 and replace R9 with an insulated wire link. For example, suppose the supply input voltage is 5 volts regulated and you want a backlight current of 150 mA. Guessing the LED voltage to be 4.1 volts, the resistor value is 0.9 / 0.15 = 6 ohms and its power dissipation is 135 mW. You would use a 5.6 ¼ watt resistor to allow for some voltage across Q2. This arrangement will be quite sensitive to changes in input voltage. An increase to 5.5 volts will increase the current to 230 mA and the dissipation in R13 to 327 mW. Perhaps a ½ watt resistor would be sensible.
Q1 and Q2 are now driven into saturation when the backlight is turned on by PF7. The voltage across R8 is known to be close to 3.5 volts, so its value can be easily calculated to supply adequate base current to Q2. A value of 560 ohms should be good for up to 250 mA in the backlight. Lower values would waste a little current but you could stick with 220 ohms and do no harm. The voltage across R10 is also known and will be close to 2.0 volts. To reduce the current drawn from PF7, its value should be increased to something in the range of 3.3 kohms to 10 kohms.
If you want the backlight to be on all the time, omit the transistors, R8 and R10, and put an insulated wire link from the collector to the emitter of Q2.
The standard build option is suitable for simple on/off control of the display backlight. It can be adapted by software for intensity control by switching PF7 on and off. A switching frequency of 100 Hz with pulse width modulation of the on time is recommended.
Alternatively, R10 can be disconnected from PF7 and connected to a timer output for hardware assisted PWM control of light intensity. No special provision is made for this on the main board. Install R10 in a user prototyping area instead of its normal position. Wire one end to the normal position at the end closest to U1 (the end not marked PF7). Wire the other end to the timer output of your choice.
ZiLOG and Z8 Encore! are registered trademarks of ZiLOG, Inc.
Copyright © 2004, ECROS Technology, all rights reserved.