Nokia 5110 LCD & 74hc595 on SPI?
#1
Posted 29 October 2011 - 01:21 PM
#2
Posted 29 October 2011 - 02:46 PM
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 29 October 2011 - 03:44 PM
-- H.L. Mencken, "What I Believe"
#4
Posted 29 October 2011 - 04:08 PM
technically, the "latch pin" is something different than a "chip select" pin, and the usage as chip select is not quite correct - you'll notice that when you don't make full writes to the shift register (the shift registers still use the clock and data inputs even when you don't write to it, so if you don't use full writes on the shift registers you'll see garbage - if you always write all bits in the shift registers you won't notice).
Ok, that makes sense. So if I was using the SPI to write to the lcd those bytes would also be transferred into the 595, but unless I set latch, nothing will happen. But if I then stop writing to the lcd and want to use the 595, I have to make sure I set all 8 bits then set latch otherwise some old stuff from the lcd would be there. Am i correct?
Now, I've noticed this morning while looking at some other code that it looks like i can use the 595 on regular GPIO pins and use a software spi? Since I'm only wanting to control LEDs, and they won't change their state very often (possibly every few seconds, but more like minutes), that should also work fine as the slower speed shouldn't be a concern?
Also, when using SPI, other than pins 11-13, are any other pins reserved and not usable as GPIO? I get mixed signals reading some of the forms. It seems maybe pin 4?
Thanks again.
#5
Posted 30 October 2011 - 07:18 AM
Pins 11, 12 and 13 form the SPI bus together. Pin 4 has a bug at the moment that's under research, all other pins are useable.Also, when using SPI, other than pins 11-13, are any other pins reserved and not usable as GPIO? I get mixed signals reading some of the forms. It seems maybe pin 4?
For pin 4, I wrote a MultiSPI class that helps supporting multiple SPI devices and it also fixes the pin 4 issue:
http://netmftoolbox....ew/10376#134132
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#6
Posted 30 October 2011 - 12:10 PM
-- H.L. Mencken, "What I Believe"
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users