Shop OBEX P1 Docs P2 Docs Learn Events
programming LEDs-> — Parallax Forums

programming LEDs->

ArchiverArchiver Posts: 46,084
edited 2004-04-21 17:58 in General Discussion
hi again,

i'm using the max7219 and a bs2 to program 52 discrete LEDs. i've managed
to figure out how to program them into the patterns i need (thanks in part to
some of the tips people here have given me- my first foray into basic stamp
programming has been very succesful so far!), but i have one last thing that i
would like to do that i can't seem to figure out:

i'm hoping to program the LEDs to go dim to bright simultaneously, analog
style. i thought i could do this by some sort of PWM variant, but i've been told

that the stamp is not fast enough to be able to process that. i feel like there
must be a way! anyone have any tips on how to program this, or whether its
possible??

thanks

heather

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-04-21 14:59
    Heather,
    The MAX7219 has an intensity register which will allow you to adjust
    the brightness of the LEDs. The data sheet says this alters an
    internal PWM driver. There is also a single resistor connected to the
    IC which would allow you to adjust the brightness manually. I have not
    personally done this but if you have a good handle on the rest of the
    programming you should have no trouble adjusting the intensity
    register.

    Lee Harker


    --- In basicstamps@yahoogroups.com, "myamygdala" <myamygdala@y...>
    wrote:
    >
    >
    > hi again,
    >
    > i'm using the max7219 and a bs2 to program 52 discrete LEDs. i've
    managed
    > to figure out how to program them into the patterns i need (thanks
    in part to
    > some of the tips people here have given me- my first foray into
    basic stamp
    > programming has been very succesful so far!), but i have one last
    thing that i
    > would like to do that i can't seem to figure out:
    >
    > i'm hoping to program the LEDs to go dim to bright simultaneously,
    analog
    > style. i thought i could do this by some sort of PWM variant, but
    i've been told
    > that the stamp is not fast enough to be able to process that. i feel
    like there
    > must be a way! anyone have any tips on how to program this, or
    whether its
    > possible??
    >
    > thanks
    >
    > heather
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-21 17:58
    > i'm hoping to program the LEDs to go dim to bright simultaneously, analog
    > style. i thought i could do this by some sort of PWM variant, but i've been
    told
    > that the stamp is not fast enough to be able to process that. i feel like
    there
    > must be a way! anyone have any tips on how to program this, or whether its
    > possible??

    Actually the MAX7219 will do this for you; From the data sheet
    @<http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf>:

    "Digital control of display brightness is provided by an
    internal pulse-width modulator, which is controlled by
    the lower nibble of the intensity register. The modulator
    scales the average segment current in 16 steps from a
    maximum of 31/32 down to 1/32 of the peak current set
    by RSET (15/16 to 1/16 on MAX7221)"

    Basically you write an intensity value (0-15) into the intensity register
    (0x0A). Done. ;-)

    --
    Enjoy,
    George Warner,
    Schizophrenic Optimization Scientists
    Apple Developer Technical Support (DTS)
Sign In or Register to comment.