plasmaninjaa
Member
Hi all.
I am working on an RGB led project and I am trying to get a picaxe talking to a WS2803 chip.
I know on this forum there is a lot of information and code for the WS2801 chip, but I haven't had any success learning or transferring any of that knowledge to this.
I am very new at understanding communicating between chips and things such as spi and i2c.
I got this chip working with an arduino which uses a shiftout command: shiftOut(ws2803_dataPin, ws2803_clockPin, MSBFIRST, "value from 0-255");
With this code, I am able to pwm individual leds on each output pin.
So I went ahead and bought some 14m2 chips thinking they supported the SHIFTOUT command, however I just found out they don't
Doing a bit of research, I found that you can achieve spi if you do it manually (like in code examples 2 and 3 on the SHIFTOUT command page), however the several lines of code that it takes to achieve the same as the shiftout command (which I only understand because it is relatively similar to the arduino's) look gibberish to me.
Here is my arduino code that I am trying to convert to the picaxe. All it is is a simple led chaser that goes through each pin over and over again: View attachment arduino led chaser WS2803.txt
And at the bottom is my attempt at converting the code to picaxe. Obviously it doesn't work because the 14m2 doesnt support shiftout.
So if someone could please help me out with this I would really appreciate it. All I need is to get some very basic led control and I should be fine figuring out the rest (i.e. pwm for rgb to achieve colors etc...)
also just as a side note, I don't understand what LSB and MSB mean, so if someone has a good quick explination or a useful link that will make sense to a beginner like me, it would be really appreciated as well.
Cheers
I am working on an RGB led project and I am trying to get a picaxe talking to a WS2803 chip.
I know on this forum there is a lot of information and code for the WS2801 chip, but I haven't had any success learning or transferring any of that knowledge to this.
I am very new at understanding communicating between chips and things such as spi and i2c.
I got this chip working with an arduino which uses a shiftout command: shiftOut(ws2803_dataPin, ws2803_clockPin, MSBFIRST, "value from 0-255");
With this code, I am able to pwm individual leds on each output pin.
So I went ahead and bought some 14m2 chips thinking they supported the SHIFTOUT command, however I just found out they don't
Doing a bit of research, I found that you can achieve spi if you do it manually (like in code examples 2 and 3 on the SHIFTOUT command page), however the several lines of code that it takes to achieve the same as the shiftout command (which I only understand because it is relatively similar to the arduino's) look gibberish to me.
Here is my arduino code that I am trying to convert to the picaxe. All it is is a simple led chaser that goes through each pin over and over again: View attachment arduino led chaser WS2803.txt
And at the bottom is my attempt at converting the code to picaxe. Obviously it doesn't work because the 14m2 doesnt support shiftout.
So if someone could please help me out with this I would really appreciate it. All I need is to get some very basic led control and I should be fine figuring out the rest (i.e. pwm for rgb to achieve colors etc...)
also just as a side note, I don't understand what LSB and MSB mean, so if someone has a good quick explination or a useful link that will make sense to a beginner like me, it would be really appreciated as well.
Cheers
Attachments
-
2.8 KB Views: 20