Jump to content
Sign in to follow this  
RobG

WS2812 WS2811 driver (Tiva)

Recommended Posts

Hi Rob!

Could you please explain what is the "SSI2_DR_R" in your code? can't find it anywhere in source files or the datasheet

Share this post


Link to post
Share on other sites

thanks, found it. Your coding is too advanced for me :P.

 

I made a code, that can't have code runing while updating, so i decided to check if there was anytigh in here. Now the seniors decided that i have to use addresseble led strips only so TLC5940 work down the drain for my project :/ 

I find the WS2812 slow compared to the WS2801 but i'm going to implement the quad-SSI with the 4 modules at the same time if needed. Alredy have it "working", only need to organize the data so it works with the quad-ssi (simple enough). Right now i got 34uS update time per LED vs the 30uS theorical, seems pretty good.

 

Look, pretty lights:

teste_ws2812v1_1_clean.zip

Share this post


Link to post
Share on other sites

Are you glen from E2E? I am Luis Afonso

sorry is it? it's actualy a rar file but i simply changed the extension to zip (the forum doesn't alow rar)

try chaging it back to rar, but here is another one, remember it's for tm4c1294

 

teste_ws2812v1_1_clean.zip

 

 

Also, i've been sucesseful on using the DMA to control up to 16 paralel outputs. It's possible to expand to 32 ports. It uses 3 bytes per 8 paralel bits. I think i have a solution for the smal DMA counter of 10bits, and i hope i will find a solution to use less RAM.

Also this uses Basic transfer istead of ping pong like Amit sugested

Share this post


Link to post
Share on other sites

Hi!

 

Great coding, sir! Any chance this can run on cc3200? With the current program it doesnt work, cause it cant find "inc/hw_ssi.h".

Can you just say if its possible to use it with some alterations on the cc3200, or do i need to make something like this from scratch?

Share this post


Link to post
Share on other sites

I made a running program / library on CC3200 for WS 2812b now. Still optimizing but it runs well already with 1280 pixels.

 

Hey MaxBlitz,

 

are you willing to share your library for the CC3200?

Would love to try this on this device.

Unfortunately I didn't succeed to get the libraries for the TM4C1294NCPDT to run.

 

Thanks for your information and maybe an upload of the project files ;-)

Share this post


Link to post
Share on other sites

Hi, excellent, the code work for my. I configure the spi frequenci to 6.4 Mhz, then 0=11100000 and 1=11111000.

A question, can you explain to me this code fragment?, Thanks!!!

 

rgbDataCounter--;
uint8_t byte = *rgbDataPointer++;
txData_0 = lookupTable[byte & 0x03];
byte >>= 2;
txData_1 = lookupTable[byte & 0x03];
byte >>= 2;
txData_2 = lookupTable[byte & 0x03];
byte >>= 2;
 
ROM_SSIDataPut(SSI2_BASE, lookupTable[byte]);
while(ROM_SSIBusy(SSI2_BASE)){};
ROM_SSIDataPut(SSI2_BASE, txData_2);
while(ROM_SSIBusy(SSI2_BASE)){};
ROM_SSIDataPut(SSI2_BASE, txData_1);
while(ROM_SSIBusy(SSI2_BASE)){};
ROM_SSIDataPut(SSI2_BASE, txData_0);
while(ROM_SSIBusy(SSI2_BASE)){};

WS2812B.pdf

Share this post


Link to post
Share on other sites

Hi, can i revive this  thread after such a long time?

I'm wondering why you are using the SPI Module and not a timer module?

Is there any advantage using SPI to using a Timer with something like PWM?

Share this post


Link to post
Share on other sites

@binbsoffn

have a close look at how the SPI approach works: 

 

It is simple, elegant, and quite precise with minimal processor cycles   It even wotks with Energia.  Now try it with timers...   You will need to switch back and forth on timer settings during output.   Can you make it work?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×