EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Interfacing a QVGA Display with MSP430

Started by John September 30, 2012
Hello all,

I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.

High Regards,

John.

Beginning Microcontrollers with the MSP430

Not sure.. but you might want to ask Rb at the 43oh forums. Not sure if he
is here:
http://www.43oh.com/forum/viewtopic.php?f5&t215&p#588#p23499

On Sun, Sep 30, 2012 at 8:44 PM, John wrote:

> **
> Hello all,
>
> I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface
> to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this
> processor is fast to fill the whole display at once.
>
> High Regards,
>
> John.
>
>
>

--
MachineGrid - Robots,
Hacks and Technology.
43oh - MSP430
Discussion,
News and Projects.
C2KCentral - C2000 News, Projects and
Forums
Stellarisiti - Stellaris ARM Forums,
Projects and News.


John

We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.

Blakely

--- In m..., "John" wrote:
>
> Hello all,
>
> I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
>
> High Regards,
>
> John.
>

Hi Blakely,

Thank you for your comment.  When you mention that you turn off the display would you mean turning the back light off?  
I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.

High Regards,

John.
________________________________
From: Blakely
To: m...
Sent: Monday, October 1, 2012 6:35 AM
Subject: [msp430] Re: Interfacing a QVGA Display with MSP430


 
John

We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.

Blakely

--- In m..., "John" wrote:
>
>
>
> Hello all,
>
> I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
>
> High Regards,
>
> John.
>




John

Yes, turning off the backlight.

I will do a measurement of full screen write, say a solid color and let you know what the timing was. Might take a day for me to get to it.

Blakely

--- In m..., john Mcdonald wrote:
>
> Hi Blakely,
>
> Thank you for your comment.  When you mention that you turn off the display would you mean turning the back light off?  
> I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
>
> High Regards,
>
> John.
>
>
> ________________________________
> From: Blakely
> To: m...
> Sent: Monday, October 1, 2012 6:35 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>  
> John
>
> We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
>
> Blakely
>
> --- In m..., "John" wrote:
> >
> >
> >
> > Hello all,
> >
> > I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
> >
> > High Regards,
> >
> > John.
> >
>
>
>
>
>
>

John

I measured a full display write at 122 ms. This is on a 24 MHz F5419A using an screen write command written in assembly language.

Because the F5419A does not have any external memory, one has to synthesize the data port and all of the control lines to the display. Since nearly everything is written to the display and virtually nothing read from it, an 8 bit I/O port is used as the main display data port. In our application, we chose to use 18 bit color controlled by 3 byte writes.

The chip select and register select are outside of the main loop, but the 3 byte data write, each with two I/O port writes to generate the write strobe are in the main loop. This is then followed by multi-register loop counter arithmetic.

The inner loop will thus execute 240*320 = 76,800 times. Given the 122 ms timing, this puts each loop pass at 1.58 us or roughly 38 clocks at 24 MHz.

Hope this helps you make your choice.

Blakely

--- In m..., john Mcdonald wrote:
>
> Hi Blakely,
>
> Thank you for your comment.  When you mention that you turn off the display would you mean turning the back light off?  
> I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
>
> High Regards,
>
> John.
>
>
> ________________________________
> From: Blakely
> To: m...
> Sent: Monday, October 1, 2012 6:35 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>  
> John
>
> We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
>
> Blakely
>
> --- In m..., "John" wrote:
> >
> >
> >
> > Hello all,
> >
> > I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
> >
> > High Regards,
> >
> > John.
> >
>
>
>
>
>
>

Hi Blakely,

Thank you so much for the measurement.  I do appreciate it.
I was just wondering if you were using the DMA for transferring the information to the I/O port would it make any difference? 

Please let me know what I am doing wrong in my calculation. 
(240 * 320 * 18 * 38 / 8) * (1/24)* 10^(-6) = 273.6 ms.

High Regards,

John.
________________________________
From: Blakely
To: m...
Sent: Tuesday, October 2, 2012 8:19 AM
Subject: [msp430] Re: Interfacing a QVGA Display with MSP430


 
John

I measured a full display write at 122 ms. This is on a 24 MHz F5419A using an screen write command written in assembly language.

Because the F5419A does not have any external memory, one has to synthesize the data port and all of the control lines to the display. Since nearly everything is written to the display and virtually nothing read from it, an 8 bit I/O port is used as the main display data port. In our application, we chose to use 18 bit color controlled by 3 byte writes.

The chip select and register select are outside of the main loop, but the 3 byte data write, each with two I/O port writes to generate the write strobe are in the main loop. This is then followed by multi-register loop counter arithmetic.

The inner loop will thus execute 240*320 = 76,800 times. Given the 122 ms timing, this puts each loop pass at 1.58 us or roughly 38 clocks at 24 MHz.

Hope this helps you make your choice.

Blakely

--- In m..., john Mcdonald wrote:
>
> Hi Blakely,
>
> Thank you for your comment.  When you mention that you turn off the display would you mean turning the back light off?  
> I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
>
> High Regards,
>
> John.
>
>
> ________________________________
> From: Blakely
> To: m...
> Sent: Monday, October 1, 2012 6:35 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>  
> John
>
> We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
>
> Blakely
>
> --- In m..., "John" wrote:
> >
> >
> >
> > Hello all,
> >
> > I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
> >
> > High Regards,
> >
> > John.
> >
>
>
>
>
>
>




John

The problem with DMA is that it does not generate any write strobes for the QVGA display. Display data is presented on a 8 bit I/O port and then a output from another I/O port needs to drop low, then rise high to create the write pulse. For each byte written to the display port, you will have two more writes to the control line port.

Not sure about the math. The 18 looks like the number of bits to be written, but in reality, it is 24 if you do three 8 bit writes. You could use a wider bus to write to the display, but this makes the color data more complicated. If you have images stored in Flash in the most efficient format for transfer, then you could gain some speed this way.

Blakely

--- In m..., john Mcdonald wrote:
>
>
>
> Hi Blakely,
>
> Thank you so much for the measurement.  I do appreciate it.
>
>
> I was just wondering if you were using the DMA for transferring the information to the I/O port would it make any difference? 
>
> Please let me know what I am doing wrong in my calculation. 
>
>
> (240 * 320 * 18 * 38 / 8) * (1/24)* 10^(-6) = 273.6 ms.
>
> High Regards,
>
> John.
>
>
> ________________________________
> From: Blakely
> To: m...
> Sent: Tuesday, October 2, 2012 8:19 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>  
> John
>
> I measured a full display write at 122 ms. This is on a 24 MHz F5419A using an screen write command written in assembly language.
>
> Because the F5419A does not have any external memory, one has to synthesize the data port and all of the control lines to the display. Since nearly everything is written to the display and virtually nothing read from it, an 8 bit I/O port is used as the main display data port. In our application, we chose to use 18 bit color controlled by 3 byte writes.
>
> The chip select and register select are outside of the main loop, but the 3 byte data write, each with two I/O port writes to generate the write strobe are in the main loop. This is then followed by multi-register loop counter arithmetic.
>
> The inner loop will thus execute 240*320 = 76,800 times. Given the 122 ms timing, this puts each loop pass at 1.58 us or roughly 38 clocks at 24 MHz.
>
> Hope this helps you make your choice.
>
> Blakely
>
> --- In m..., john Mcdonald wrote:
> >
> > Hi Blakely,
> >
> > Thank you for your comment.  When you mention that you turn off the display would you mean turning the back light off?  
> > I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
> >
> > High Regards,
> >
> > John.
> >
> >
> > ________________________________
> > From: Blakely
> > To: m...
> > Sent: Monday, October 1, 2012 6:35 AM
> > Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
> >
> >
> >  
> > John
> >
> > We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
> >
> > Blakely
> >
> > --- In m..., "John" wrote:
> > >
> > >
> > >
> > > Hello all,
> > >
> > > I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
> > >
> > > High Regards,
> > >
> > > John.
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>

The correct equation is 240 x 320 x 38 x 1/24 x 10^-6. The 18 is bits
per pixel, but these are actioned as 3 bytes, and those 3 bytes are all
transferred in the 38 clock inner loop, so the *18 and /8 are superfluous.

Al

On 3/10/2012 2:53 AM, john Mcdonald wrote:
>
> Hi Blakely,
>
> Thank you so much for the measurement. I do appreciate it.
> I was just wondering if you were using the DMA for transferring the information to the I/O port would it make any difference?
>
> Please let me know what I am doing wrong in my calculation.
> (240 * 320 * 18 * 38 / 8) * (1/24)* 10^(-6) = 273.6 ms.
>
> High Regards,
>
> John.
> ________________________________
> From: Blakely
> To: m...
> Sent: Tuesday, October 2, 2012 8:19 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>
> John
>
> I measured a full display write at 122 ms. This is on a 24 MHz F5419A using an screen write command written in assembly language.
>
> Because the F5419A does not have any external memory, one has to synthesize the data port and all of the control lines to the display. Since nearly everything is written to the display and virtually nothing read from it, an 8 bit I/O port is used as the main display data port. In our application, we chose to use 18 bit color controlled by 3 byte writes.
>
> The chip select and register select are outside of the main loop, but the 3 byte data write, each with two I/O port writes to generate the write strobe are in the main loop. This is then followed by multi-register loop counter arithmetic.
>
> The inner loop will thus execute 240*320 = 76,800 times. Given the 122 ms timing, this puts each loop pass at 1.58 us or roughly 38 clocks at 24 MHz.
>
> Hope this helps you make your choice.
>
> Blakely
>
> --- In m..., john Mcdonald wrote:
>> Hi Blakely,
>>
>> Thank you for your comment. Â When you mention that you turn off the display would you mean turning the back light off? Â
>> I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
>>
>> High Regards,
>>
>> John.
>> ________________________________
>> From: Blakely
>> To: m...
>> Sent: Monday, October 1, 2012 6:35 AM
>> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>> Â
>> John
>>
>> We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
>>
>> Blakely
>>
>> --- In m..., "John" wrote:
>>>
>>>
>>> Hello all,
>>>
>>> I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
>>>
>>> High Regards,
>>>
>>> John.
>>>
>>
>
>
>
>
Thank you Blakey for your comment in regard to transferring the data to the I/O port through DMA.  I also appreciate Al,  he clearly explained how 122 mS was calculated.  I am still wondering if there is a general rule how to determine the clock frequency for filling up the entire QVGA LCD without building up slowly.  I am very grateful to Blakely for measuring the time which helps me a lot.

High Regards,

John.
________________________________
From: Onestone
To: m...
Sent: Tuesday, October 2, 2012 2:21 PM
Subject: Re: [msp430] Re: Interfacing a QVGA Display with MSP430


 
The correct equation is 240 x 320 x 38 x 1/24 x 10^-6. The 18 is bits
per pixel, but these are actioned as 3 bytes, and those 3 bytes are all
transferred in the 38 clock inner loop, so the *18 and /8 are superfluous.

Al

On 3/10/2012 2:53 AM, john Mcdonald wrote:
>
> Hi Blakely,
>
> Thank you so much for the measurement. I do appreciate it.
> I was just wondering if you were using the DMA for transferring the information to the I/O port would it make any difference?
>
> Please let me know what I am doing wrong in my calculation.
> (240 * 320 * 18 * 38 / 8) * (1/24)* 10^(-6) = 273.6 ms.
>
> High Regards,
>
> John.
> ________________________________
> From: Blakely
> To: m...
> Sent: Tuesday, October 2, 2012 8:19 AM
> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>
>
>
> John
>
> I measured a full display write at 122 ms. This is on a 24 MHz F5419A using an screen write command written in assembly language.
>
> Because the F5419A does not have any external memory, one has to synthesize the data port and all of the control lines to the display. Since nearly everything is written to the display and virtually nothing read from it, an 8 bit I/O port is used as the main display data port. In our application, we chose to use 18 bit color controlled by 3 byte writes.
>
> The chip select and register select are outside of the main loop, but the 3 byte data write, each with two I/O port writes to generate the write strobe are in the main loop. This is then followed by multi-register loop counter arithmetic.
>
> The inner loop will thus execute 240*320 = 76,800 times. Given the 122 ms timing, this puts each loop pass at 1.58 us or roughly 38 clocks at 24 MHz.
>
> Hope this helps you make your choice.
>
> Blakely
>
> --- In m..., john Mcdonald wrote:
>> Hi Blakely,
>>
>> Thank you for your comment. Â When you mention that you turn off the display would you mean turning the back light off? Â
>> I believe there should be a minimum time required to write to the entire display without seeing a slow write up.  I am assuming that would be 40 ms.  The way that I came up with this number is in reference to 24 FPS of video format.  If 40ms is a correct number then it can easily be calculated whether a 25MHz MSP430 is an appropriate micro to handle a TFT LCD or not.
>>
>> High Regards,
>>
>> John.
>> ________________________________
>> From: Blakely
>> To: m...
>> Sent: Monday, October 1, 2012 6:35 AM
>> Subject: [msp430] Re: Interfacing a QVGA Display with MSP430
>> Â
>> John
>>
>> We run a QVGA TFT LCD display off of a MSP430F5419A running at 24 MHz. If you write to the entire display, you will see some delay as it writes the screen. It is not too bad however. One technique is to turn off the LCD while the write is active and then turn it back on. This does not change the timing, but the sudden appearance of the new screen when turned on does seem to satisfy the some of the aesthetic expectations of the user.
>>
>> Blakely
>>
>> --- In m..., "John" wrote:
>>>
>>>
>>> Hello all,
>>>
>>> I was trying to interface a QVGA TFT LCD (18 bit color) with MPU interface to MSP430f55xx. I was just wondering if 25 MHz clock frequency of this processor is fast to fill the whole display at once.
>>>
>>> High Regards,
>>>
>>> John.
>>>
>>
>
>
>
>

The 2024 Embedded Online Conference