Here's a youtube video of the driver running the 4 Digit Demo program:
In order to control many LCD/LED segments using an Arduino (a typical 4 digit display has 32 segments) a display driver is required. These are integrated circuits which receive a serial input and only require a clock source, data, +5v and ground, with the AY0438 LCD driver requiring an additional Load input.
The supported display drivers are very basic in operation and simply remember the status of a data pin (high or low) every time the clock pin changes from high to low. The correct choice of driver will depend on whether you have an LED or LCD screen and how many outputs you require. It is also worth noting that you may cascade 2 AY0438 chips to give you control of up 64 LCD segments! The following display drivers are currently supported:
- M5450 (LED, 34 outputs)
- M5451 (LED, 35 outputs)
- MM5452 (LCD, 32 outputs)
- MM5453 (LCD, 33 outputs)
- AY0438 (LCD, 32 outputs)
The AY0438 LCD driver can drive a standard 4 digit LCD screen perfectly. A typical 4 digit LCD display should be able to display 8.8.:8.8 - a digit, decimal point, a digit, decimal point and/or colon, digit, decimal point and a digit.
It may be possible for the other display drivers to duplex or multiplex but this is currently not implemented.
Setup
You should consult the datasheet for your display driver first (see datasheets folder) and I have included some brief instructions on how to wire everything up. The drivers are very simple to use and are all quite similar in operation.
Connect your Arduino up to the display driver as shown, you can use any digital pin, but since pins 0, 1, and 2 are used for interupts, I recommend using pins 3, 4 and 5, if required.
ARDUINO DRIVER PIN
+5v --> Vdd
Ground --> Vss
Digital 3 --> Clock
Digital 4 --> Data
If you have the AY0438 driver you also need to connect a digital pin to Load on the driver:
Digital 5 --> Load (AY0438 only)
You will now need to connect your driver to your display. This is time consuming so you should find a datasheet for your device to save you time when wiring it up. It is important that you wire the digit segments in order from A to G. If your LCD/LED screen has a decimal point and colon in the same position (if 08:50 and 08.50 is possible) wire the decimal point first then the colon.
DRIVER SCREEN
Seg 01 --> Digit 1, segment A
Seg 02 --> Digit 1, segment B
Seg 03 --> Digit 1, segment C
Seg 04 --> Digit 1, segment D
Seg 05 --> Digit 1, segment E
Seg 06 --> Digit 1, segment F
Seg 07 --> Digit 1, segment G
Seg 08 --> Decimal point 1
Seg 09 --> Digit 2, segment A
Seg 10 --> Digit 2, segment B
Seg 11 --> Digit 2, segment C
Seg 12 --> Digit 2, segment D
Seg 13 --> Digit 2, segment E
Seg 14 --> Digit 2, segment F
Seg 15 --> Digit 2, segment G
Seg 16 --> Decimal point 2
Seg 17 --> Colon
Seg 18 --> Digit 3, segment A
: :
Seg 32 Digit 4, segment G
NOTE:
- If you are using LEDs they should all have a common anode: all positive ends of the LEDs should be wired to +5V and the negatives to the driver so that current flows into the driver.
- If you have an LCD screen you will also need to connect the backplane and driver oscillators as below. The backplanes could be controlled using the arduino but I decided to keep thigs simple and avoid this.
AY0438
BP --> LCD Backplane
LCD --> Capacitor --> Arduino Ground
The capacitor value can vary from 20 pF for 140 hz - 120pF for 50 Hz display refresh. This can be found in the datasheet.
MM5452/MM5453
BP OUT --> LCD Backplane
BP IN --> LCD Backplane
OSC IN --> 0.01 uF Capacitor --> Arduino Ground
OSC IN --> 50K --> Driver VDD
Coding
The driver is initilised using begin() which tells the library which display driver is used and what the screen definition is. You can use any of the following characters to tell the library how your screen is wired to your driver:
- minus
. decimal point
: colon
| decimal point and colon
8 digit
Examples:
// LED driver with 1 digit screen
screen.begin("M5451","8");
// LED driver with 2 digit screen with decimal points
screen.begin("M5451"...
Read more »