Re-using pins while still connected to MAX7219 ?
Hello.
I have 12F1840 which is connected to MAX7219. As amount of ports is quite low, 3 ports are wasted on driving that IC. I would like to be able to use any of these pins for reading a button or driving a buzzer. If I understand properly, if I drive MAX7219 CLK pin low, IC will be locked, no matter what happens on other pins, right?
Re: Re-using pins while still connected to MAX7219 ?
It has been a long time since I’ve used that chip But I’m pretty sure you only need 3 pins It is a serial chip. And you may get by with using two of those pins But there will be no updating of the display
Re: Re-using pins while still connected to MAX7219 ?
It's in the data sheet.
Load-Data Input. The last 16 bits of serial data are latched on LOAD’s rising edge.
So, Just hold the LOAD pin low until you have the new data shifted into the MAX7219. You can use the clock and data pins as you wish as long as the LOAD pin is low.
Re: Re-using pins while still connected to MAX7219 ?
Thanks, that's excellent idea.
I want to attach button which will pull that pin low, when pressed. Since pin is already connected to IC, do I still need pull up resistor?
Re: Re-using pins while still connected to MAX7219 ?
Why yes you do and don't forget to set the pin as an INPUT.
Re: Re-using pins while still connected to MAX7219 ?
Thanks, I have another idea.
What I use data pin for beeper? I think I can connect emitter follower thru capacitor to that pin, and buzzer to emitter follower? MAX7219 data speed should be high enough, so buzzer won't play anything while transferring the data? :)
Re: Re-using pins while still connected to MAX7219 ?
Probably you will get audible click on start and stop of data transition, and probably some noise during.
You may implement this
https://www.romanblack.com/shift1.htm
Also you could use SPI port expander, and and use inverted CS signal to drive it. Or some additional transistor circuit to activate buzzer only when LOAD is low.