Shop OBEX P1 Docs P2 Docs Learn Events
Best way to use Prop 2 pins for multi-color LEDs — Parallax Forums

Best way to use Prop 2 pins for multi-color LEDs

Invent-O-DocInvent-O-Doc Posts: 768
edited 2013-03-25 05:53 in Propeller 2
I'm thinking that the large number of pins might make the prop2 a good chip to drive an 8x8 RGB LED Matrix display, using 3 sets of 8 pins for rows (one each R, G and B) and using a high current sink type serial shift register for ground.

What do you think would be the best approach to adjust the brightness of individual LEDS colors?

1) Use the DAC function to vary voltage

2) Use counters to achieve a PWM effect

3) Other technique I haven't thought of/

Comments

  • LeonLeon Posts: 7,620
    edited 2013-03-24 13:18
    PWM gives control over a wider range than you can get by varying the voltage.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2013-03-24 13:31
    The P2 is probably fast enough that you could use shift registers for all of it and still get a decent number of colors via PWM.

    The P1 can drive a single color 128x32 pinball DMD display using an all shift registers like setup and get a few shades on it.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-03-24 18:51
    I'm not brave enough for that one, Roy, but DO want to use all those fancy pins directly.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2013-03-24 23:51
    Brave enough? Using shift registers is pretty easy.
  • RaymanRayman Posts: 14,633
    edited 2013-03-25 05:53
    Invent-O-Doc, you can do this with Prop1 already... Look here:
    http://www.rayslogic.com/Propeller/Products/PropRGB/PropRGB.htm

    But, would be much better with Prop2.
    The extra memory, faster processor and more pins will allow one to do a lot more....
Sign In or Register to comment.