PDA

View Full Version : Max7219 always on



george miyagi
06-16-2005, 12:19 AM
i've been trying to get the MAX7219 to work on a LED matrix.

using the following code:
Clock CON 2
DPin CON 0
Load CON 1
LOW Load
SHIFTOUT DPin, Clock, MSBFIRST,[$090F\16]
HIGH Load
row VAR BYTE
col VAR BYTE
row=%10000000
Main:
row = row >>1
IF row = 0 THEN row = %1000000
FOR col = 1 TO 5
SHIFTOUT Dpin,Clock,MSBFIRST,[col, row]
PULSOUT Load,30000
PAUSE 50
NEXT

GOTO Main

problem is, the lights always stay on. i can see flickering (extra brightness) representing where they should be on.
but can't get them to switch off.
help please!!


(i just recently edited the code to intialize - the naimation plays superbright onto of all lights being on medium bright)

Post Edited (george miyagi) : 6/17/2005 9:46:23 AM GMT

Chuck Rice
06-16-2005, 03:28 AM
It looks like the problem might be in the PAUSE 50. I think that would be a really short time period. Something like 1/20 th of a second. What happens if you change it to PAUSE 5000 (5 seconds). That would give you time to see it before the next character went out. -Chuck-

slotcarz
06-16-2005, 09:28 AM
Maybe this might help. I had a similar problem and I had to reverse the connections on the LED's. I had my cathodes on the rows and the (-) on the columns. After I switched the connections the Max7219 worked properly. I just was only able to use sample code to make it work, which it did. Maybe this will work for you or maybe not... good luck

george miyagi
06-17-2005, 04:17 PM
mmmm. sorry. none of these worked