DMA with K20 and graphic LCD ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA with K20 and graphic LCD ?

504 Views
night
Contributor II

Hi,

I'm using Kinetis K20 100 MHz in a project that needs to drive COG LCD 240x128 display. Display runs OK, but the microcontroller needs to run very fast and when I need to paint a new LCD it spends a lot of time for do it. LCD uses a gpio for control and 8 gpio for data information. The idea is use DMA for translate info from microcontroller to the GPIOs automatically and liberate microcontroller. Current display data is stored in microcontroller RAM and, periodically must send to the 8 GPIOs with GPIO signal control. When a display need to be modificated the new data is stored in RAM for DMA access.

Is it possible to do? How can I translate 8 data bits to 8 GPIOs (parallel) and generate control signal using DMA?

Thanks for your help. Best regards,

Miguel Ángel.

Labels (1)
0 Kudos
1 Reply

342 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Miguel,

Regarding your question to use DMA to fetch LCD data from RAM and put it on GPIO so that the GPIO can simulate the LCD timing, I think the solution  is okay, but I have not tested it on board yet. I suggest you order an EVM board and test it.

Pls download the an4419, which focuses on the solution to use DMA to toggle GPIO so that the GPIO can simulate a PWM signal, it is very similar to your case. but the difference is that you drive multiple GPIO, while the application note just drive/ toggle one GPIO, NOTE THAT THERE IS A LIMITATION AT PAGE 5 WHICH SAYS "

The output GPIO pin number is 1 per each GPIO port. 2 output pins from 1 port is not accepted. Because GPIO can accept only 1 DMA trigger."

For the DMA/PIT/GPIO solution, the triggering source is GPIO pin rather than PIT, I think you just need set only one GPIO pin as triggering source by setting the IRQC bits as 3 in the PORTx_PCRn. Every DMA transfer needs to toggle the pin, so you can use the pin as LCD_CLK, it is okay. For example, if you configure the GPIO_A0 as the LCD_CLK, the RAM data is like this:

xxxxxxx0

xxxxxxx1

xxxxxxx0

xxxxxxx1

For the other GPIO pins which simulate the data or V sync or H sync, you can configure the IRQC as 0000 in binary. Because the limitation, I do not guarantee the solution is okay, you'd better order an EVM and have a try.

Hope it can help you.

BR

XiangJun Rong

http://cache.nxp.com/files/microcontrollers/doc/app_note/AN4419.pdf?fsrch=1&sr=1&pageNum=1

0 Kudos