Shop OBEX P1 Docs P2 Docs Learn Events
Max7219 always on — Parallax Forums

Max7219 always on

george miyagigeorge miyagi Posts: 48
edited 2005-06-17 08:17 in BASIC Stamp
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,[noparse][[/noparse]$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,[noparse][[/noparse]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

Comments

  • Chuck RiceChuck Rice Posts: 210
    edited 2005-06-15 19:28
    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-
  • slotcarzslotcarz Posts: 30
    edited 2005-06-16 01:28
    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 miyagigeorge miyagi Posts: 48
    edited 2005-06-17 08:17
    mmmm. sorry. none of these worked
Sign In or Register to comment.