I'm trying to use a 74hc595 shift register to drive my 8-segment LED, mostly for educational purposes. I've read up on the shift register and studied the datasheet and several tutorials, but I can't get my circuit to work.
Circuit is basically this:
- Q0 thru Q7 on the 74hc595 connected to the segments on the LED
- LED grounded via a 220R resistor to common ground.
- VCC on 74hc595 to arduino +5v
- GND on 74hc595 to common ground
- SER on 74hc595 to pin 11 on arduino
- RCLK (latch) on 74hc595 to pin 12 on arduino
- SRCLK (clock) on 74hc595 to pin 8 on arduino
My code basically:
- Sets the latch pin LOW
- uses the shiftOut to send 0xF (a byte of all 1's) to the data pin
- sets the latch pin to HIGH
If I understand correctly, this should light up all the segments, but instead nothing happens. I know my LED is good, it works if I apply current directly. How can I troubleshoot this to know if my 74hc595 is bad? The full model number on the chip is M74hc59581, but I couldn't find a datasheet on that. Other similar chips seemed to have all the same pinouts, but is it possible this one has a different pinout? (FWIW, this came in a kit, and the PDF that came with the kit shows the same pinout as other 74hc595 chips).
Sorry this is vague, but I don't have my code in front of me, and mostly I want to know if I'm missing something high-level before stepping into the details.