In this article I describe how to wire a 20x4 character display to an Arduino. I’m assuming you are using a regular 5V 8bit Arduino, if this is not the case this article will not work for you as you’ll need voltage level converters. Most character based LCD displays use the same wiring, but I can’t guarantee that all will be the same. If your display is the same it will look like the diagrams on this page and will have 16 pins.
On the previous page, we dealt with driving one display. Here we use a multi-segment display. Just like the previous display, this 7 segment unit will have a common pin but this time there will be one for each digit. So for a 4 digit display there will be four common pins. However, what you will notice is that there is only a single set of A-G connectors shared by all the LED segments.
Measuring voltage from an analog input. Following on from the Arduino 7 segment LED display tutorial we now build on this example and generate a simple voltage meter. Additional requirements: Potentiometer of at least 10Kohms. In order to measure voltage, we need to use an Arduino board analog input. Usually these are marked separately as “analog in”. We are going to use a potentiometer to adjust the voltage at the analog input.
If you've got a 7 segment display but are not sure if it is common anode or common cathode, then you need to check the polarity of the display. This is easily done with a low voltage supply (9V or less) from a battery, bench PSU or Arduino board. Firstly and before anything else, connect a 1K resistor between the common pin and the battery. This will avoid potential damage to the LED's in the display.
This Arduino library makes it easy to drive a multiple digit 7 segment display without having to worry about constantly redrawing the digits. To avoid this the library uses the timer 1 interrupt to refresh the display. In addition to the interrupt driven refresh, which frees up the main loop from refreshing the displays, it has many helper functions to make writing to the display easy. In order to use the library first download or get the source from google code by using the link below.
In this tutorial I show you how to connect a 7 segment display to an Arduino board. For a tutorial showing how to drive 4 or 8 digit displays see (Arduino multiple digit, 7 segment display tutorial). Firstly, we must know what type of display we have as there are two possible forms, common cathode and common anode. If the display is common cathode, then the LOWER voltage side is common, if the display is common anode, then the HIGHER voltage side is common.