Hello
@Y@@J
Y@@J wrote: Sun Dec 13, 2020 5:31 pm
was wondering if your VGA driver could run on a LPC1768/9 (also Cortex M3...)
The concepts of BlueVGA driver can apply to any capable Microcontroller. Yes, it can be applied to a LPC1768/9.
Y@@J wrote: Sun Dec 13, 2020 5:31 pm
I've no idea about the instruction set and registers differences between these processors and a STM32F103, and I'm not low level enough to understand the datasheets.
They are different microcontrollers. Their Registers are not he same, CPU frequency is not the same.
Both only use the same Cortex M3, thus ASM shall be the same, but I'd do something different given that LPC1768/9 has more SRAM.
Y@@J wrote: Sun Dec 13, 2020 5:31 pm
The idea being to add a VGA output to a 3D printer running Marlin on such a MC 'MPC1769). Works this way : double buffering, a memory bitmap being sent to a graphics display. This bitmap could be sent to a VGA display along (or not) with the graphic LCD or OLED or TFT... Uses u8glib.
For now, I can decode a OLED SPI signal and get still images of the display : means VGA is feasible, at least through a BluePill running your lib. But it would be much smarter if VGA feature could be added to Marlin... Marlin was written for Arduino, ported to many other platforms after a HAL was created. Reading the code, some bits are Arduino, some others are written with Cube (NVIC***). Most functions in your library (if not all) are standard C functions. The "offending" parts are the assembly instructions, the registers and the interrupt management (the core functions...). On my side, if it needs any porting, it's a dead end !
In your opinion, could your library be used as sis for a driver in such a software without modification ?
No, it has to be ported, but for sure feasible. It would require time, a lot of reading, some coding and testing - just to make BlueVGA run on the LPC. Anyway, I don't have an LPC1769/8 development board to try it...
Regarding running Marlin and a VGA driver on the same MCU, I'd say that I'm not sure it would work and for sure it is not so easy to integrate.
VGA driver is a real time application that uses Timer IRQs to send images to the VGA monitor, and usually it consumes a lot of CPU cycles, unless DMA is used to send pixels to screen - but it may display incorrectly because of image artifacts due to DMA bus access arbitration. At the same time, a 3D printer controller, such as Marlin, has pretty much of its own timing demands as it also has to control the step motors, the nozzle and bed temperatures, the extruder etc.
It'd require a large effort in my opinion... and a LOT of testing!