Friday, 28 September 2018

microcontroller - When IO is limited on a uC, how do you move the logic away from the uC?


For instance, if you had an Arduino with 4 digital IO pins, how could you independently light > 4 LEDs, or read the state of > 4 buttons?



Answer




A shift register such as the 74595 will allow you to have many outputs with only 2 connections: a data pin and a clock pin. You set the data pin to the next value you want to move into the register, and then pulse the clock pin.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...