Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Materials
- Shift register
- 8 LEDs
- 8 330R resistors
- 19 wires
- Procedure
- Place the shift register on the breadboard, splitting the 2 rows of pin by the “panama canal”
- Place the 8 LEDs on the breadboard on the side WITH the serial number and put the negative (shorter) leg on the negative strip on the breadboard
- Place a resistor (for each LED) from the positive leg of the LED to the other side of the breadboard
- Place a wire from the non-serial side (shift resistor pin 1,2) to the first LED
- Place another wire from the serial side (shift resistor pin 2,1) to the second LED
- Place another wire from the serial side (shift resistor pin 2,2) to the third LED
- Place another wire from the serial side (shift resistor pin 2,3) to the fourth LED
- Place another wire from the serial side (shift resistor pin 2,4) to the fifth LED
- Place another wire from the serial side (shift resistor pin 2,5) to the sixth LED
- Place another wire from the serial side (shift resistor pin 2,6) to the seventh LED
- Place another wire from the serial side (shift resistor pin 2,7) to the eighth LED
- Place another wire from the serial side (shift resistor pin 2,8) to the negative strip of the breadboard on that side
- Place another wire from the non-serial side (shift resistor pin 1,1) to the positive strip of the breadboard on that side
- Place another wire from the non-serial side (shift resistor pin 1,3) to the pin 8 on the processor
- Place another wire from the non-serial side (shift resistor pin 1,4) to the negative strip of the breadboard on that side
- Place another wire from the non-serial side (shift resistor pin 1,5) to the pin 9 on the processor
- Place another wire from the non-serial side (shift resistor pin 1,6) to the pin 10 on the processor
- Place another wire from the non-serial side (shift resistor pin 1,7) to the positive strip of the breadboard on that side
- Place the final wire connecting from the negative strip on the breadboard on one side to the other
- Explanation
- Today, we finished learning about the shift register. We created sequences which is pretty self-explanatory but it’s a pattern that the lights turn on in. Ex: 1, 2, 4, 8, 16, 8, 4, 2, 1. You have to use these numbers because the shift register uses the 8-bit system. We created 4 sequences, one of which we made on our own, and set them to random using a switch statement.
- Reflection
- Today was pretty good once I fixed my short circuit. I had the shift resistor backwards. Also, one of my prongs broke so I had to get another one from Ms. Suarez. Other than that minor complication, the coding was good and I used some old code if I got stuck.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement