Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Controls/MCUs

Add graphics without employing dedicated graphics controller

Posted: 24 Nov 2011 ?? ?Print Version ?Bookmark and Share

Keywords:graphics controller? LCD? microcontroller?

The low-cost, controllerless (LCC) software driver from the microcontroller supplier should help with synchronizing timing parameters, such as pulse-width, front-porch, and back-porch, for both horizontal and vertical pulses. These timing constants can be found in the data sheet of the specific LCD Panel to be used. It is usually a value given in pixel clocks. These constants help set up the proper frequencies needed to produce an accurate image data on the display.

The following code snippet from an LCC driver library illustrates the steps to set up a system that operates a controllerless graphics configuration.

//Suspend ALL DMA transfers


#define PMP_MODE


// Set up the PMP
// PMP is setup to use data and address lines, in 16 bit PMP mode
// PMP wait states are set to fastest

//Set PMP address to 0
PMADDR = 0x0000;

// Open the desired DMA channel
DmaChnOpen(1, 0, DMA_OPEN_DEFAULT);

// Set the transfer event control: what event is to start the DMA transfer
DmaChnSetEventControl(1, DMA_EV_START_IRQ(_TIMER_2_IRQ));

// Set the transfer parameters: source & destination address, source & destination size,number of bytes per event source is the PMP, destination is a dummy array, source size is 2 for 16bit color, first destination size is the backporch, transfers per event is two.
DmaChnSetTxfer(1, (void*)&PMDIN ,&GraphicsFrame[0] , 2, HBackPorch, 2);

// Set INT controller priority to 7 for highest priority

// Set INT controller sub-priority

// Enable the transfer done interrupt, when all buffer transferred
DmaChnSetEvEnableFlags(1, DMA_EV_BLOCK_DONE);

// Enable the interrupt in the INT controller

// Once configured, enable the DMA channel

// Turn on Timer2 to act as a "trigger" for the pixel clock (DMA transfer)
OpenTimer2(T2_ON | T2_SOURCE_INT | T2_PS_1_1, 10);

// Start ALL DMA transfers

Other considerations
Just because you can use a controllerless configuration to manage the graphics display does not mean it will always be the best idea. For example, a graphics controller may make more sense if your graphical interface needs the performance benefits of hardware acceleration, such as to implement alpha blending, transparency, or scrolling functions. Using larger display resolutions can push the processing requirements beyond the range that a controllerless implementation can support. Also, a deep color depth, such as using a 24bit color depth, can exceed the performance that the controllerless method can deliver.

These considerations aside, using a controllerless approach usually provides cost benefits, but there are some tradeoffs for those benefits. For example, there is some CPU overhead for managing the continuous LCD refresh. The Interrupt Service Routine (ISR) that updates the LCD timing constraints is the only part of the system that consumes CPU bandwidth because everything else is handled by the DMA transfer.

?First Page?Previous Page 1???2???3???4???5?Next Page?Last Page

Article Comments - Add graphics without employing dedic...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top