New-Tech Europe | May 2017

Controlling graphics without a controller

MICROCHIP

A look at how a virtual controller can be set up to save cost and CPU time when rendering graphics One of the popular ways of creating graphical embedded applications is to add an internal or external graphics controller. The problem is that this adds cost and can make designs unnecessarily complex, and in most cases for a simple graphical user interface such controllers are not needed. An alternative is to usemicrocontroller peripherals to create a virtual graphics controller for graphics rendering without taking up large amounts of CPU time, in fact it can be less than five per cent. In general, a controllerless graphics

system needs to send a frame of pixel information to a display glass at a certain rate. This refresh rate is usually around 60Hz. To do this, the system must constantly send frame data to the LCD panel. At first, it seems like this task would take up most of the CPU time in an MCU. However, this is not the case for microcontrollers, such as Microchip’s PIC32 MCUs, that contain a direct memory access (DMA) peripheral for data transfer. With a DMA transferring the pixel data, less than five per cent of CPU time can be used to achieve a virtual graphics controller. The DMA peripheral can transfer data from one location to another without CPU intervention. In a controllerless graphics method, the DMA can be set up to transfer one line of frame

data at a time through the parallel master port (PMP). Each line consists of many pixels. The DMA would send a portion of the frame buffer during one transfer. A PMP or timer interrupt request would then trigger the next DMA transfer until a line is transferred. In devices with non- persistent interrupts, a timer can be used as the DMA trigger source. For devices with an external bus interface (EBI), this module can be used as a pixel clock source. Such a clock source can achieve faster pixel clock speeds than the PMP peripheral, yet the EBI shares the same pins as the PMP. During data transfers, the PMP or EBI strobes a read or write signal after each pixel transfer. The read- write strobes act as the pixel clock

38 l New-Tech Magazine Europe

Made with