From the course: Learning Arduino: Interfacing with Hardware
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
The shiftOut command - Arduino Tutorial
From the course: Learning Arduino: Interfacing with Hardware
The shiftOut command
- Okay, so for the command that we're using in order to code the shift register, is a shiftOut command. ShiftOut command simply shifts out bits of data one at a time, so starting from either the most significant, or the least significant. The command has the following syntax: so you start with a dataPin, clockPin, and then the bitOrder if you're doing most significant or least significant, and finally, the data. So let's go ahead and do the coding for it. Okay, so this is the shiftOut. Then we write down the dataPin, clockPin. Now in the bit order, it's either most significant or least significant. The way we did the wiring was for the most significant bit, so we go with most significant bit first, and then finally the data that we'd like to show. And in our case, we're trying to show the numbers that you see in line nine to ten. So I'm going to go ahead and write down the array name. So now since I want to show the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Understanding the shift register2m 24s
-
(Locked)
MC74HC595A shift register overview1m 5s
-
(Locked)
Wire up the input and clock signals2m 1s
-
(Locked)
Wire up the signals for VCC and GND2m 52s
-
(Locked)
Wire up the 7-segment LED2m 18s
-
(Locked)
Initializing pins for the shift register2m 56s
-
(Locked)
The shiftOut command3m 21s
-
(Locked)
-
-