How to use the 74HC595 Shift Register with Arduino.
ฝัง
- เผยแพร่เมื่อ 17 ก.ค. 2020
- This tutorial shows the basic working principles of the 74HC595 shift register with Arduino. The 74HC595 is an 8-bit serial to parallel shift register that is used to increase the number of input or output pins of a microcontroller.
I have demonstrated the use of this shift register to control LEDs to make a simple LED chaser and Binary counter.
Subscribe to my channel: bit.ly/2LiMpF0
For the code and schematics visit the link: mytectutor.com/how-to-use-the... - วิทยาศาสตร์และเทคโนโลยี
Very clear explained for everyone, great video, great animations about registrów works. it was very difficult to understsnd your english.
can you show how shift reguster can control 3 l293 motor driver to drive 6 dc motor
Your code is wrong doesn't upload
Tiene un pequeño error. Este compila
int tDelay = 250;
int dataPin = 4; // DS - data serial on 74HC595
int latchPin = 7; // ST_CP - storage register clock pin on 74HC595
int clockPin = 8; // SH_CP - shift register clock pin on 74HC595 - Why not D13 SCK pin?
bool DirectionState = 0;
void setup(){
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop(){
byte leds = 0B00000000;
updateShiftRegister(leds);
delay(tDelay);
for (int i = 0; i < 8; i++){
// set the bit i to 1, starting with bit 0, the least significant bit (rightmost bit)
bitSet(leds, i);
updateShiftRegister(leds);
delay(tDelay);
}
DirectionState = !DirectionState;
}