0

im new to arduino and thinking to create a LED project.

im creating a LED project and i want to control 12 LED's. so i use two 7HC595 but problem i face is how can i only control 12 outputs ?

and i want to create multiple blink patterns with 12 LED, please be kind enough to provide blink patterns that i can modify and create different partners.

i have found many shift-out programs but i do not understand how to limit it to 12 outputs and create multiple blink patterns.

thanks

5
  • Other than only outputting 12 bits? Commented Oct 11, 2015 at 15:54
  • Just act like there are 16 leds, but keep the last 4 leds off all the time.
    – Gerben
    Commented Oct 11, 2015 at 17:49
  • How can i code it. Any examples?
    – meva
    Commented Oct 12, 2015 at 0:39
  • Is Google not working? Try here.
    – Nick Gammon
    Commented Oct 12, 2015 at 20:09
  • Thanks for the grate tutorial. How can i make multiple blink patterns
    – meva
    Commented Oct 13, 2015 at 0:56

2 Answers 2

1

Do not worry about limiting it to 12 bits, send all 16 and use just the twelve you need. You never know you may expand the project. Whatever is on the unused bits is irrelevant. they do nothing.

1

If you use 74HC595, you have to send data to all the bits no matter what. Even if you only want to change 1 bit, you have to resend the whole bit sequence.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.