Max7219
Rino
Posts: 15
I am having·a hard time to make the BS2 communicate with the MAX7219.· I am trying to write a program that will read fuel level in 4 tanks with capacitive probes using RCTime.· I can do the reading OK but I cannot display the results on one 4 digit display.· Each digit show the result of one tank.· Each digit display 0 (empty) to 9 (full).· I tried to copy the program in the AppKit: Using the MAX7219 LED Displa Driver. no succcess yet.
My·Initialize section of the program:
For index = 0 to7
Lookup index, [noparse][[/noparse]Scan,3,Brite,10,Decode,$1F,switch,1], max_dat
Shiftout DataPin, Clock,msbfirst,[noparse][[/noparse]max_dat]
if odd = 0 then noLoad
Pulsout Load, 5
noLoad:
Next
The display section of the program:
Shiftout DataPin,clock, msbfirst, [noparse][[/noparse]index]
Pulsout Load, 5
Shiftout DataPin,clock, msbfirst, [noparse][[/noparse]time2]
Pulsout Load, 5
No response·on the display.
If you see a problem in the preceeding code, please tell!
Rino Lacombe
·
My·Initialize section of the program:
For index = 0 to7
Lookup index, [noparse][[/noparse]Scan,3,Brite,10,Decode,$1F,switch,1], max_dat
Shiftout DataPin, Clock,msbfirst,[noparse][[/noparse]max_dat]
if odd = 0 then noLoad
Pulsout Load, 5
noLoad:
Next
The display section of the program:
Shiftout DataPin,clock, msbfirst, [noparse][[/noparse]index]
Pulsout Load, 5
Shiftout DataPin,clock, msbfirst, [noparse][[/noparse]time2]
Pulsout Load, 5
No response·on the display.
If you see a problem in the preceeding code, please tell!
Rino Lacombe
·
Comments
The following link contains some sample code for using the MAX7219 which may or may not be easier to understand than the AppNote code, which is rather out-dated. I hope this helps. Take care.
http://forums.parallax.com/showthread.php?p=552892
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support