Daveolw1
Posts: 64
Joined: Thu May 16, 2019 10:24 am

Raspberry pi/Max7219 3.3 volt level to 5 volt problem

Wed Mar 18, 2020 2:36 pm

Raspberry pi 3b with desktop to Max7219 supplying a Kingbright cc56-21SYKWA 8 x 7 segment display, and it works fine most of the time, but sometimes it shows spurious information on a digit. I saw information about using a level converter because the Max7219 requires 3.5 volts for high. I made the circuit as shown on Github but I get no display at all. I cannot understand the Max7219 datasheet regarding the SPI, it appears not to be fully SPI compatible, using a Logic analyzer to view clock/DIN/Load connections shows the following.
Max7219.png
Max7219.png (86.64 KiB) Viewed 151 times
The top is without the level converter and does work ok, the bottom is with level converter and does not work. The clock does not seem a constant even pulse and the DIN does not show the 16 bit of data as referred to in the data sheet. The data sheet seems to say the "LOAD" is not used with the Max7219 although I have it connected as per the Github information.
LevelC.png
LevelC.png (71.07 KiB) Viewed 151 times


Any ideas why this level converter does not work, is it to do with the 10k pullup on the 5 volt? is there a better circuit to use?

Thanks David

LTolledo
Posts: 3432
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Raspberry pi/Max7219 3.3 volt level to 5 volt problem

Wed Mar 18, 2020 10:06 pm

I've got no problems on this RPi1A with 6 x Max7219 matrix display
RPi1A Max7219 x 6 Matrix display.jpg
RPi1A Max7219 x 6 Matrix display.jpg (252.26 KiB) Viewed 115 times
I've also tested this on another type of Max7219 matrix display (4-ganged like the one below) in 3 x 4-gang + 2 x singles, for a total of 14 x 8x8.
4-ganged Max7219 matrix display.jpg
4-ganged Max7219 matrix display.jpg (42.9 KiB) Viewed 115 times
the only time I encountered spurious display was when the connections were not stable, or when there are loose contacts....
thus I made my own style connectors... but its better if its permanently soldered.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry pi/Max7219 3.3 volt level to 5 volt problem

Wed Mar 18, 2020 10:30 pm

FWIW, I've used a selection of pre-built "Level Shifter Modules" most of which are, AFAICT, based upon a similar approach to your circuit:
https://www.cpmspectrepi.uk/raspberry_p ... dules.html
At least one the links in the above page points to a test board that has subsequently been used to drive Max7219 based modules eg. this one: https://www.cpmspectrepi.uk/raspberry_p ... sembly_Etc.
and further images/info. here: https://www.cpmspectrepi.uk/raspberry_p ... odule.html
You're correct in stating that a Max7219 does not fully honour SPI ie. /CE - treated as just /LD
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “General discussion”