74HC595 shift registers

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

74HC595 shift registers

Post by mcauser » Thu May 27, 2021 11:55 pm

Made a little MicroPython driver for 74HC595 shift registers, both SPI + bit bang.
More examples coming soon.
https://github.com/mcauser/micropython-74hc595

pidou46
Posts: 101
Joined: Sat May 28, 2016 7:01 pm

Re: 74HC595 shift registers

Post by pidou46 » Fri May 28, 2021 7:40 am

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 ?
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

Mark's Bench
Posts: 9
Joined: Wed May 12, 2021 9:47 pm

Re: 74HC595 shift registers

Post by Mark's Bench » Sat May 29, 2021 1:53 am

This is fantastic - thank you for posting!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: 74HC595 shift registers

Post by pythoncoder » Mon May 31, 2021 5:47 am

@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.
Peter Hinch
Index to my micropython libraries.

pidou46
Posts: 101
Joined: Sat May 28, 2016 7:01 pm

Re: 74HC595 shift registers

Post by pidou46 » Mon May 31, 2021 2:56 pm

@pythoncoder do you have some specific binary counter ref in mind ?

On my side I have investigate and found: NXP - PCF8593 with i2c interface
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

Post Reply