Shop OBEX P1 Docs P2 Docs Learn Events
Max7221 — Parallax Forums

Max7221

ArchiverArchiver Posts: 46,084
edited 2001-03-07 20:56 in General Discussion
Does anyone have code that works with the MAX7221 (8-digit LED
display driver) chip? I have tried the app kits code without success.
I'm only using two large LED (0.800"). Do I need some additional
circuitry because only 2 of the 8 digits are used?

This is the code I've been using (it should configure the chip and
display the number six):

<
>
DIN con 4
CS con 5
CLK con 9

Loop var byte
maxout var byte
pulse var bit

DIRS=%1111111111111111

pause 1000

shiftout DIN,CLK,1,[noparse][[/noparse]$0901\16]
pulsout CS, 3

shiftout DIN,CLK,1,[noparse][[/noparse]$0A0F\16]
pulsout CS, 3

shiftout DIN,CLK,1,[noparse][[/noparse]$0B00\16]
pulsout CS, 3

shiftout DIN,CLK,1,[noparse][[/noparse]$0C01\16]
pulsout CS, 3

shiftout DIN,CLK,1,[noparse][[/noparse]$0106\16]
pulsout CS, 3

end
<
>

Thanks!!
--Jeff

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-03-07 20:56
    Your code looks good. Are you sure that all the connections are correct
    on the 7221? i.e., cathode on pin 11, segments on the correct pins,
    ground to both pins 4 and 9, +5 on 19 and +5 through a resister on 18 to
    set the voltage, et al.

    -
    Ian Bobbitt
    When an error occures:
    A novice user blames himself,
    a normal user blames the computer,
    a power user sighs and gets another cup of coffee.

    KB9VEX

    ICQ: 14106680

    It said requires windows 95 or better, so I installed Linux.
Sign In or Register to comment.