ShiftBrite

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
MikeCyber
Posts: 5
Joined: Tue Mar 30, 2010 1:47 pm
Contact:

ShiftBrite

Post by MikeCyber »

Hello,
I recently bought a couple ShiftBrites, http://docs.macetech.com/doku.php/shiftbrite . I thought it would be simple enough to write something simple to controll the ShiftBrites, just to get things started, but I've managed to do no such thing. If anyone would be willing to look at the link, there is some code written for Arduino as well as infographics describing how to control the ShiftBrite module, if you could lend me a hand in getting a similar program up and running in Flowcode, and the PIC, I'd be so very grateful.
My approach was to define red, green and blue as Ints, and use the subtraction method of decimal to binary to control 1 output pin, and for each output on that pin, pulse another pin acting as the clock. Needless to say, it didn't work.
Thanks in advance,
Mike

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: ShiftBrite

Post by Benj »

Hello Mike,

It looks like the device is using the SPI communications protocol. You should be able to replicate the functionality inside of Flowcode using SPI transactions and port pin toggling. If you get stuck then post up what you have done and I will have a quick look for you.

MikeCyber
Posts: 5
Joined: Tue Mar 30, 2010 1:47 pm
Contact:

Re: ShiftBrite

Post by MikeCyber »

Hi Benj,
I am not familiar with spi, but I have included what I've tried so far.
As far as I know, this should be sufficient to make the ShiftBrite work.
Thank You,
Mike
Attachments
BinaryOut.fcf
(13.19 KiB) Downloaded 271 times

Post Reply