Go Down

Topic: 4 shift registers (Read 2060 times) previous topic - next topic

TomGeorge

#15
Mar 03, 2018, 12:39 am Last Edit: Mar 03, 2018, 12:41 am by TomGeorge
Hi,
Can you post a higher resolution image of your schematics please?
It is not possible to read pin designators.

What will you be doing with CA output header?

Have you got this breadboarded and using a UNO, or a 328 chip and PCB?

Can you post a picture of your project please?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

PaulMurrayCbr

Only 8 go through.
Well, there you go then. Same code, it should be pushing out 16 if it was a bug in the code. Only 8 go through.

How about if you feed the bits into the third register? Do all 16 bits load into the 3rd and 4th? You have a wiring problem between the data out of the second register and the data in of the third.

TomGeorge

Hi,
This Library will probably make things easier.


Code: [Select]
  ShiftRegister74HC595.h - Library for easy control of the 74HC595 shift register.
  Created by Timo Denk (www.simsso.de), Nov 2014.
  Additional information are available on http://shiftregister.simsso.de/
  Released into the public domain.
*/

#include <ShiftRegister74HC595.h>

// create shift register object (number of shift registers, data pin, clock pin, latch pin)
ShiftRegister74HC595 sr (1, 0, 1, 2); 
 


https://shiftregister.simsso.de/
Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Nielska

Well, this is something weird. I tried connecting the 'green' LED's to the first register and they don't light up.

TomGeorge

Hi,
This diagram is weird, what are the green lines doing?


Tom.... :o
Everything runs on smoke, let the smoke out, it stops running....

Nielska

Hi,
This diagram is weird, what are the green lines doing?


Tom.... :o
I deleted the lined from the LEDs to the third shift regeister en connected them to the first shift register.

TomGeorge

#21
Mar 03, 2018, 12:27 pm Last Edit: Mar 03, 2018, 01:37 pm by TomGeorge
Hi,
Have you looked at my suggestion in post #17?

Have you written code just to get the first  595 connected and working?
Then added the next 595 connected and got that working.
Then added the next and the next, each time getting the code to work before continuing.

If not I suggest you do, so you can prove your code is working at each stage.

Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

TonyWilk

Well, this is something weird. I tried connecting the 'green' LED's to the first register and they don't light up.
Ah, so the RED LED's did work when connected to the first shift register, but the GREEN ones don't ?

Since your code looks ok and the first shift register was working, it is possible that all the shift registers are working but the LEDs are not connected correctly.

Could be:
a. the GND connection to the GREEN LED's
b. the GREEN LEDs are the wrong way round

Try: unplug one green LED wire from the shift register and touch it to the 5V line - the LED should light, if not then check the GND connection, then try turning the LED round.  

Yours,
 TonyWilk


TomGeorge

Hi,
Do you have a DMM?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Nielska


TomGeorge


Hi.


Have you checked the 5V supply to ALL the 595s.
Check for connectivity to the 595 pins, with the power OFF.


Does your protoboard have a break in the red/blue or red/black line down the side of the protoboard, ie the power bus lines?


Can you post a picture of your project please?


Thanks... Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Nielska

It's fixed, apparently there is a broken connection in my breadboard. Thanks to all of you who were willing to help me.

Go Up