Hardware Reference
In-Depth Information
The labels A B C D E F G are a common convention used by the industry for
labelling 7-segment displays. If you look carefully at many displays you will see
that the segments are very slightly slanted to the right. This is just a design
feature that most display manufacturers have adopted to make the segment
display look more visually appealing.
There are lots of different types of 7-segment display that you can buy, and many
of them are wired differently. Some displays are common-cathode (which means
that all of the negative leads of each LED are connected together) and some are
common-anode (meaning that all of the positive leads of each LED are connected
together). You will also find that some 7-segment LED modules use different
pins for different LED segments. This project uses a particular common-anode
7-segment display from www.skpang.co.uk, but if you buy a different display,
check the wiring details carefully before wiring it up. If you have a different
(common-cathode) display, I have put comments in all of the programs in this
adventure next to the ON constant, so you know what to change if you have a
different display.
Wiring Up the.7-Segment Display
Now you are ready to connect your 7-segment display to the breadboard to check that
it works properly, by following these steps:
1. Push the 7-segment display into your breadboard so that half of it overlaps the
top of the breadboard and half of it overlaps the bottom of the breadboard. There
are five pins at the top and five pins at the bottom, and each pin lines up with a
hole in the breadboard.
2. Run a wire from the top middle pin of the display (the common anode) to the
3.3 volt power rail at the top of the breadboard. (If you have a different display to
me and you are using a common cathode display instead, you will have to run a
wire from the bottom middle pin of the display to the 0 volt power rail at the
bottom of the breadboard.)
3. Because this display has LEDs inside it, you need to use a resistor like you did
before. But there are eight LEDs, so you need to use eight resistors. Take each
330-ohm resistor (colours orange, orange, brown), bend both of its legs over,
and place each resistor between a specific pin of the display, and a spare hole in
the breadboard. Figure 5-12 shows how the display needs to be wired up. Look
back at Figure 5-4 to remind yourself which way the strips on the breadboard are
connected, so that you don't short all your resistors together!
 
Search WWH ::




Custom Search