SPI code to daisy chain HC595 chips #318
Replies: 3 comments
-
Posted at 2014-10-11 by DrAzzy 959? Do you mean 595? How do you have them wired? If you mean 595s, review the description of the two clock pins. The led is flashing between the two spi.send()s, I'll wager. I think the way to fix is to put the latch clock on a different gpio pin and pulse it high after you send the two bytes to it, then it will only latch the data in the shift register once it has all the data. Also, why two spi.send? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-10-12 by @gfwilliams As @drazzy says, try |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-10-13 by Owen Yes sorry I meant 595. That code worked perfectly, thanks. I didn't think I was meant to be doing two spi.send() commands but didn't know you could pass an array into it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-10-11 by Owen
Hello,
I have daisy chained two HC959 ICs together and wired them up to 16 LEDs. The code below produces a Nightriders effect with the LEDs running up and down. Everything is working well but I must be doing something wrong as the LED 8 above or below the lit one very quickly flashes on too. This would be coming from the other IC so I think the issuebut not sure how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions