Page 1 of 1

74HC595 shift registers

Posted: Thu May 27, 2021 11:55 pm
by mcauser
Made a little MicroPython driver for 74HC595 shift registers, both SPI + bit bang.
More examples coming soon.
https://github.com/mcauser/micropython-74hc595

Re: 74HC595 shift registers

Posted: Fri May 28, 2021 7:40 am
by pidou46
Thanks for sharing this mcauser,

Could this device can be used to count pulses ?
I'm searching a work around to the lack of pulse counter support for ESP32. (in official firmware at least)
I understand that shift register device can be used to do exactly that, am I right ?
Do you know if 74HC595 can do it ? if it's the case do you think you can add this behaviour to the driver ?

Re: 74HC595 shift registers

Posted: Sat May 29, 2021 1:53 am
by Mark's Bench
This is fantastic - thank you for posting!

Re: 74HC595 shift registers

Posted: Mon May 31, 2021 5:47 am
by pythoncoder
@pidou46 A shift register is not the right component for pulse counting. Assuming the pulses are arriving too fast to count in software, I would consider a binary counter chip.

Re: 74HC595 shift registers

Posted: Mon May 31, 2021 2:56 pm
by pidou46
@pythoncoder do you have some specific binary counter ref in mind ?

On my side I have investigate and found: NXP - PCF8593 with i2c interface