PDA

View Full Version : shiftbrite controlled with BS2



MR SPARKY
11-04-2009, 11:11 AM
I am interested in using shiftbrite leds. I was wondering if anyone knew how to control them with a BS2IC. I will have multiple leds hooked up.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!

Mike Green
11-04-2009, 11:35 AM
These modules look very much like a 74HC595 serial in / parallel out shift register. There are plenty of examples of this for the BS2. Look at the StampWorks Manual in the chapter on digital output expansion. You would use the SHIFTOUT and PULSOUT statements to control it. Look at the description of these statements in the Stamp Syntax and Reference Manual.

Do a search of the Parallax website for StampWorks Manual and you'll find a link for downloading the manual.

The Stamp Manual is available for download too. Go to the main Parallax webpage and click on the "Resources" tab, then the "Downloads and Press" link, then the "Stamp Documentation" link.

MR SPARKY
11-04-2009, 11:47 AM
here is a link to the led documentation. its a 32 bit 3 channel pwm serial controler.

http://docs.macetech.com/doku.php/shiftbrite

there is a sample program for use with arduino. Arduino is a little different from pbasic. im not sure how it converts.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I light up·everyones life!!!!!

Mike Green
11-04-2009, 12:44 PM
There is no ready-made sample program for the Allegro controller used in the ShiftBrite. Like I said, the controller looks somewhat like the 74HC595 and there exists sample code for that. You'll have to learn PBasic sufficiently to convert the Arduino code to PBasic. There are plenty of introductory texts including the Stamp Manual and "What's a Microcontroller?" all of which are freely downloadable from Parallax.

The Stamp can easily transfer the 32 bits needed for each controller chip using the SHIFTOUT statement and can even transfer them as groups of 10 bits (plus an extra 2 bits) as shown in the ShiftBrite documentation. Again, look in the Stamp Manual chapter on the SHIFTOUT statement to see.