More fun with ws2812 this time XC8 and CLC

For some reason it's running at 6 mhz not 64 and the datasheet made my head hurt because nothing in it will work you get errors im having a time finding the 18f25q10 or 18f26q10 h file then I could see the naming used.
I tried MCC it set up for 64 but it didn't run at it

Now I have a pikit5 it works with IPE but soon as I unplug the dang thing it pops into emergency mode so I have to put in boot mode and reinstall firmware every time I use it
 
The DotStar strands from Adafruit are way easier to work from because the timing isn't critical - you have a data and clock pin (4-wire with power ). And you can use much higher clock speeds for large refreshes.
 
Well it would be easy but i can't get a 1000 pages of help like most can
The crystal pins in data sheet for one the pin out don't show any and there new data sheets are awful
Then I tried swordfish and the chip is locked to use intosc so I can't change the configure word easy
Plus this is no day job I work on control wiring for automation PLC VFD high voltage stuff like that.
Oh i forgot i'm 16 years older now my brain half dead lol

I have this working with arduino and 18f252 bit bang but i figure i play with CLC but I think I'll stay with arduino

The 18f25q10 and 18f26q10 maybe not the best chips to play with
 
Hey Burt... My setup is stuck at 8Mhz (32 / 4 ) so the base is 8 and not 16 So I am also running too slow.

I'm going to keep going as I know I'll get it soon. The OSCCON 1 and 2 confuse me right now. but I'll get there.


The minefield of Timer 2 is bad enough as I'm not getting 1.25uS on the SPI..
 
There a bunch of settings the mcc didn’t get clock to run at 64 mhz I even tried swordfish basic it has a include that handles setup for clock I only got about 8 mhz but with your code the wave form looks good but it only gets color on few leds then there white
 
I’m toggling a pin toggle with my logic tool
I looked at the asm and counted cycle it’s close to 8 MHz
 
When I first looked at the code The CLC out is multiplexed, when its a one the clock is the high at 637 ( which is a bit too small) and the low is derived from the CCP .. But the SDO is in gate 2 and gate 4 but the CLCPOLCON was set to gate 4.. I set it to gate 2 ( same as the coments ) maybe it needs to be set to gate 4.

At least 1 gate must be reversed.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…