4 ms·
Doing it on a ATTiny85 is a lot more impressing than doing it on a "larger" microcontroller :)
by ajsnigrutin 4y ago
Doing it on a ATTiny85 is a lot more impressing than doing it on a "larger" microcontroller :)
- bluGill 4y agoIn some ways it is less though, as the larger CPU on the pi has things like cache that mess with your timing, while with the smaller CPUs you can lookup exactly how long each instruction will take and thus get the timing right. In the end though, both are very impressive, the hardware just gives different challenges to work with. edit, reading more I realized the pi pico isn't doing this on the main cpu, but on the PIC (which isn't on a normal pi I think). I have no idea what that is able to do, but it changes the above.
- magicalhippo 4y ago> with the smaller CPUs you can lookup exactly how long each instruction will take and thus get the timing right Reminds me of the good old demo scene hack to get 18-bit color[1] back in the VGA days (and probably earlier) by changing the color palette per pixel through careful timing of the instructions. IIRC you ignore the pixel values entirely, writing effectively a single "color", ie palette index, and then just change that single palette entry per pixel, timed so it's ready just when the output DAC is clocked to the next pixel. edit: I forgot which demos I've seen this effect in, but searching for it led me down a marvelous rabbit hole where I stumbled over someone[2] managed[3] to get 1k colors over CGA[4], apparently discussed here[5] a couple of years ago. [1]: https://en.wikipedia.org/wiki/Video_Graphics_Array#Color_palette https://en.wikipedia.org/wiki/Video_Graphics_Array#Color_pal... [2]: https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-illustrated/ https://int10h.org/blog/2015/04/cga-in-1024-colors-new-mode-... [3]: https://www.reenigne.org/blog/1k-colours-on-cga-how-its-done/ https://www.reenigne.org/blog/1k-colours-on-cga-how-its-done... [4]: https://en.wikipedia.org/wiki/Color_Graphics_Adapter https://en.wikipedia.org/wiki/Color_Graphics_Adapter [5]: https://news.ycombinator.com/item?id=21992870 https://news.ycombinator.com/item?id=21992870
- Narishma 4y agoI think you're confused. This is on a Raspberry Pi Pico, which is a microcontroller and has no cache.
- GekkePrutser 4y agoIt's still a hell of a lot more powerful than an attiny85 though which is only an 8 pin micro for the smallest stuff. I love those little things and I used them all the time until most stuff became connected and the esp8266 was more useful because of its wi-fi.
- deleted 4y ago[deleted]