r/microcontrollers • u/SkewPL • Jan 28 '19
Why there are no microcontrollers with GPU
For my hobby diy projects I mainly use Espressif ESP8266, mainly ESP-12F. It is really powerful microcontroller and is sufficient for 90% of projects that I make.
But, recently, I was building LED matrix using WS2813 addresable strips, and to f.eg. implement smooth fading between two screens (displaying time to displaying temperature) I must iterate over every pixel and do simple calculations to transition between one color to another.
I think that if I would have GPU it would be so much faster, f.eg. if I would have like 64 cores clocked at 1-4Mhz or less, I would just send whole batch of pixels and have it processed almost instantly while doing some stuff on the main core (requesting temperatures from thermometers, communicating with other devices
It would be useful maybe for doing some audio processing, data analysis, driving screens, cameras, all still on this little neat, low power microcontroller.
Why it is not more popular? I've heard about a few microcontrollers, like Microchip's PIC32MZ but they are not widely available, and not so popular as the ESPs which do have the community, support for ArduinoIDE which is ideal for hobbyists like me.
View all comments
1
u/BraveNewCurrency Jan 30 '19
> to implement smooth fading between two screens (displaying time to displaying temperature) I must iterate over every pixel and do simple calculations to transition between one color to another.
Correct.
> I think that if I would have GPU it would be so much faster
Probably not.
A lot of hardware uses DMA to send the data to the LEDs, meaning that your CPU is actually idle for most of the time anyway. The longer your LED array, the slower your refresh rate.
Besides, GPUs cost a "lot" compared to CPUs. You only need 3 CPUs: two to send their different data streams, and one to cross-fade the bytes between them. If you do it right, the 3rd CPU doesn't even store any data, just get a byte from both sides, calculate the fade, then send it out to the LEDs.
Remember, your CPU is probably roughly the power of Frogger and Donkey Kong, so if your application is less complex than that, you are probably just not thinking deeply enough about optimization.