Running DotStars with PIC in C code

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
finzrt2
 
Posts: 3
Joined: Thu Apr 23, 2015 9:27 am

Running DotStars with PIC in C code

Post by finzrt2 »

I wanted to find some type of example for running DotStars using a Microchip PIC in C. I have used Arduino with no issues, but for the project I am working on, I need to use a Microchip PIC. I have done 1 other project which involves SPI communication using a Microchip PIC in C, but would consider myself a newbie. I am a hardware guy trying to learn a little bit of software. Thanks! Dan

User avatar
davidl13
 
Posts: 187
Joined: Fri Oct 25, 2013 10:51 pm

Re: Running DotStars with PIC in C code

Post by davidl13 »

I haven't done the actual work but I suspect it would be feasible to adapt the PICsellator (https://learn.adafruit.com/the-picsellator) to use an MSSP as a SPI instead the existing mechanism I used to drive WS2812B's. I'm pretty sure it would take some digging through the Data Sheet and my code, though... ;-)

Let me know if there's some interest. The original PICsellator uses a PIC16F1847 but I've since ported it to a PIC16F1825 (for reduced cost/pin count). (I believe I posted the '1825 version a while back and was trying to help a guy get it going - a forum search may help.)

User avatar
finzrt2
 
Posts: 3
Joined: Thu Apr 23, 2015 9:27 am

Re: Running DotStars with PIC in C code

Post by finzrt2 »

OK, so I have the PIC16F687 up and running with the DotStars (aka p/n APA102)! I am trying to get a moving rainbow pattern for my 1m, 48pixel, strip. I can get the rainbow effect without issue, but now I am having trouble thinking of a way to make it move. Anyone have code ideas??? There doesnt seem to be anything on Google for this one.

User avatar
Franklin97355
 
Posts: 23940
Joined: Mon Apr 21, 2008 2:33 pm

Re: Running DotStars with PIC in C code

Post by Franklin97355 »

Have you looked at the Arduino code for hints on how they move the colors?

User avatar
finzrt2
 
Posts: 3
Joined: Thu Apr 23, 2015 9:27 am

Re: Running DotStars with PIC in C code

Post by finzrt2 »

I did, but thats a little over my head as far as coding experience and confidence goes. I did get a rainbow effect working to some extent. It's not as fast and fluent as I would like but I am running my pic16f689 at 25 megahertz. I really don't know how to use timers and interrupts yet, that is next on my list.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”