Shop OBEX P1 Docs P2 Docs Learn Events
driving a max7219 chip is driving me ..... — Parallax Forums

driving a max7219 chip is driving me .....

dmacqdmacq Posts: 11
edited 2004-07-26 15:02 in BASIC Stamp
Hi There, I'l guess I'll post this to the new stamp forum as welll...



·············
··············· I'd be grateful for any insights people might have for programming
··············· the Max7219 LED driver chip....
··············· After several days of fairly intense effort I've managed to light 6
··············· seven segment LEDs and get them working in a clock-like fashion
··············· But not like clockWORK..
··············· Specifically, I'm having trouble getting all of the segments to light
··············· when they're supposed to.
··············· For instance, 3, 5, 6, 8, 9 , 0, all light up fine.
··············· but the bottom parts of 1,2,4-- do not -- for any digit
··············· I'm basing my efforts on the code found at the Parallax site. I admit
··············· I had a great deal of difficulty understanding how to turn on the BCD
··············· coding for each number . But I think this is how its suppose to look
··············· for six figures....

··············· FOR index = 0 TO 10 ' Retrieve 8 items from table.
··············· LOOKUP index,[noparse][[/noparse]test,1,switch,1,scan,5,brite,15 ,decode,$3F],max_dat
··············· ' specifially that $3F
··············· SHIFTOUT DATA_n,CLK,1,[noparse][[/noparse]max_dat]
··············· PULSOUT Load,1
··············· And this is the code I use to send the numbers to the MAX chip:

··············· Secs = 45
··············· temp =secs DIG (0)
··············· temp1= secs DIG(1)
··············· SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]1]
··············· SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp]
··············· PULSOUT Load,1
··············· SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]2]
··············· SHIFTOUT DATA_n,CLK,MSBFIRST,[noparse][[/noparse]temp1]
··············· PULSOUT Load,1

··············· I'm avoiding loops until I'm sure I fully grasp this thing.
··············· In any case: why does it light some segments sometimes and not
··············· others?
··············· I believe I have the appropriate number of pull down resistors and
··············· everything seems to be fitting snugly -- any thoughts?
··············· Its infuriating to be this close and then come up short of a few lit
··············· segments.

··············· Cheers
··············· MacQ

Comments

  • dmacqdmacq Posts: 11
    edited 2004-07-26 15:02
    Solved:

    Looks as if two of the segments were shorted on the PCB board.
    Not a software problem at all.
    Whew.

    MacQ
Sign In or Register to comment.