Panglossian_Man

Hi, I've started playing around with a few 74HC595's to light a few LEDs but when I use the delay function it begins incrementing the 17th element by the amount of ms I'm delaying by ( give or take a little bit ).

// By pulsing the clock pin ( SRCLK / Shift Register CLK ), // The low to high transition shifts the data from the data pin. // (To take input from the pin, and move data across)

// By pulsing the latch pin ( RCLK / Register CLK ), // The low to high transition shifts the data to the outputs // (Turns on the LEDs based on data entered using SRCLK and SER) // Use once every 18 clocks for 6 rgb LEDs

Which means some random variable(s) (whichever ones the compiler decided to place after the array)is being stomped on. In C its entirely your responsibility to avoid such "buffer overruns" so you won't seeany useful compile-time warnings/errors about it.

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]