Shop OBEX P1 Docs P2 Docs Learn Events
RGB with BS2? — Parallax Forums

RGB with BS2?

SweLoganSweLogan Posts: 11
edited 2006-05-29 05:38 in BASIC Stamp
Hi i want a RGB diode to Loop 256 colors with a BS2.
I cant get it to work good. Geve me some code hop.gif

Comments

  • SweLoganSweLogan Posts: 11
    edited 2006-05-29 00:11
    How many PWM dose a BS2 have?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-29 01:34
    The PWM command on the BS2 can only output to 1 pin at a time.· Any of the 16 I/O pins can make use of it, although you should read the manual or Help File to make sure you understand how it works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-05-29 05:38
    SweLogan -

    Actually, the limitation that Chris mentions is true of all PBASIC Stamps, not just the BS-2, as might have been implied. The PWM on every Stamp platform is generated by software, so although you can do PWM with all 16 pin ports, you can only use one-at-a-time. The Stamp is a single tasking processor.

    In order to mix colors on your RGB LED, you will need an off-chip PWM processor, like the Parallax PWM Pal, which fits neatly underneath the Stamp:
    http://www.parallax.com/detail.asp?product_id=28020

    The nice thing about the PWM Pal is that it takes up no space at all, due to the mentioned mounting method, and it gives you a full FOUR channels of hardware PWM! Just remember to save Pin Port 0 on the Stamp for communicating between the Stamp and the PWM Pal. That is a requirement of the PWM pal, and can not be changed.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->

    Post Edited (Bruce Bates) : 5/29/2006 6:08:04 AM GMT
Sign In or Register to comment.