Thanks for all your comments and suggestions - they definitely motivate me to try different ideas
Good morning all…
Youtuber, shed dweller, solar charge controller aficionado
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Hi Julian, great video! I've been wanting to mess with these for a long time and finally got around to it… So far I have it some-what working from your screen capture of the "rotate" subroutine, the problem I am having is it will sequence the LED's then have a long delay before the next cycle… Do you have any example code to share??
You just discovered loop unrolling ๐
Agh! I love all the WS2801 stuff!!! Thanks for the programming examples!
Actually, one comment to your software diagram… The problematic area is only the bit-banging loop of led-on and led-off. To be precise, the part of the time where you send out the first bit till the transmission of the last required bit. The following timeout just sets the previously sent values to be visible. What you do before and after this transmission sequence is absolutely non-critical. Without having seen your code, may be you just need to tweak some branch decisions or you unfold a loop, or you use counting from x to 0 instead of the other way round, and you can use the untrimmed 8MHz. However: Well done video!
Them lens flares tho… lol
Nice! If you have a free pin available — can you toggle a signal with each iteration of the loop and hook up to the oscilloscope so we can see how long the loop is taking? Would also enjoy seeing how much faster than 8Mhz the clock is running at tweaked frequency.
Microchips AN244 indicates that OSCTUNE will tune a frequency within a range of +/-12 percent on the selected frequency. The only caveat is that it specifically mentions only the PIC16 & PIC18, but maybe this still valid for the PIC12s with tuneable oscillators? I'd also recommend the PIC12F1840, as it is a nice chip with the ultra low power modes, and was also the pic used chosen by Revolution Education for the 8pin model PICAXE chip.
Verry interesting and classy way of representing your loops on paper, I might do the same from now on.
Great video, as usual. Thank you Julian.
if you're just a few percent too slow, how about unrolling the loops using assembler macros? check out @cnlohr, he's done some incredible bitbanging stuff
Great video! Will you be doing AVR assembly in the near future? The AVR has no internal clock division and is cheap. Most instructions are single clock cycle execution.
I'm running into similar timing problems with my 4MHz 6502 SBC. I can fit basic patterns in the 9us window, but anything more complex causes issues. I plan to compute the pixel values beforehand, and then stream them from memory to the output.
Make an 8bit LFSR in software and display it on the ring for a sparkle effect ๐ I'm going to buy a neopixel ring and try it out !
Use MACRO instead of calling subroutines. Code size will grow considerably but you'll lose all that call/stack management and gain clock cycles.
would it be worth to see if we can get this to work with c code? ๐
Nice!