Hardware Reference
In-Depth Information
in seven-segment displays or LED matrices. Before you dive into using a shift
register with your Arduino, consider the diagram in Figure 7-1, which shows
the inputs and outputs to a serial-to-parallel shift register. Variations to this
diagram throughout the chapter illustrate how various inputs affect the outputs.
Figure 7-1: Shift register input/output diagram
The eight circles represent LEDs connected to the eight outputs of the shift
register. The three inputs are the serial communication lines that connect the
shift register to the Arduino.
SendingParallelandSerialData
There are essentially two ways to send multiple bits of data. Recall that the
Arduino, like all microcontrollers, is digital; it only understands 1s and 0s.
So, if you want sufficient data to control eight LEDs digitally (each one on or
off), you need to find a way to transmit 8 total bits of information. In previ-
ous chapters, you did this in a parallel fashion by using the digitalWrite()
and analogWrite() commands to exert control over multiple I/O pins. For an
example of parallel information transmission, suppose that you were to turn
on eight LEDs with eight digital outputs; all the bits would be transmitted on
independent I/O pins at roughly the same time. In Chapter 6, “USB and Serial
Search WWH ::




Custom Search