Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and pwmpal — Parallax Forums

BS2 and pwmpal

Steve JoynerSteve Joyner Posts: 4
edited 2007-09-28 00:27 in BASIC Stamp
I'm using a bs2 to read 3 10k pots and then send the values to the PWMPAL to control a RGB led stick.
The problem is that the stick flashes every time I update the values (about 5 times a second).

Is there any way to prevent this?

Any suggestions would be helpful.

Thanks -steve

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-24 02:50
    The PWMPAL seems to do this when the values are updated. I don't think there is a way to prevent this. If you post more information about your project, maybe someone can come up with a different way to implement it that won't flash when it's not supposed to.
  • sjoy113sjoy113 Posts: 4
    edited 2007-09-24 11:45
    Yes, that does seem to be the problem. I'm making a RGB dimmer board with RGB led strips from Superbriteleds.com. I need to scan 12 10k pots and then output a square wave with the matching duty cycle. Prop 1 controller?
  • sjoy113sjoy113 Posts: 4
    edited 2007-09-24 11:49
    It would be 4 banks of Red Green Blue values. The control square wave is 5v p-p. I would like to update the leds at least 4 times a second. -thanks
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-24 13:49
    If that's all you're going to do (use a 10K pot to set the duty cycle of an LED driver), how about using 6 dual 556 timers? Here's a website with lots of sample circuits and an R-C calculator: home.cogeco.ca/~rpaisley4/LM555.html#3.
  • sjoy113sjoy113 Posts: 4
    edited 2007-09-25 00:27
    sweet. thanks. the easy way. i had hopes of being able to program and play back a pattern. i guess its time to start learning spin.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-25 00:41
    Have a look at what Parallax did with the AVR coprocessors (ATTNY-13) for the BS2px on the Motherboard (www.parallax.com/detail.asp?product_id=28300). They can put out a PWM pulse under control of the Stamp plus read a pot. They're driven via a 1-Wire bus.· They can handle 2 pots and 2 PWM outputs each.
  • sjoy113sjoy113 Posts: 4
    edited 2007-09-28 00:27
    Thanks Mike,·



    I'm turning this one over in my (feeble) mind.· Looks like a good possibility.·
Sign In or Register to comment.