Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30794

Re: Convert 16x2 chars display to big TFT display

From pozz <pozzugno@gmail.com>
Newsgroups comp.arch.embedded
Subject Re: Convert 16x2 chars display to big TFT display
Date 2021-09-21 18:48 +0200
Organization A noiseless patient Spider
Message-ID <sid2cv$dqr$1@dont-email.me> (permalink)
References <siccap$o73$1@dont-email.me> <sicnjb$s8l$1@dont-email.me> <sicok4$3k3$1@dont-email.me> <nnd$30b3f1c5$676716e7@842302c0f288425a>

Show all headers | View raw


Il 21/09/2021 17:09, Stef ha scritto:
> On 2021-09-21 pozz wrote in comp.arch.embedded:
>> Il 21/09/2021 15:44, Reinhardt Behm ha scritto:
>>> On Tue, 21 Sep 2021 12:31:54 +0200, pozz wrote:
>>>
>>>>
>>>> So the MCU on the interface should be able to read 8 data bits, RS and
>>>> R/W signals syncronous to signal E.
>>>>
>>>> I'm thinking to configure E signal as an external interrupt on the
>>>> falling edge. In the interrupt, I read data bits, R/W and RS and decode
>>>> the instruction or data.
>>>>
>>>> Any suggestions? Maybe a similar code is already online.
>>>
>>> I guess you don't need an interrupt. The signals to the 44780 are quite
>>> slow and well sequenced. So simple polling would do.
>>
>> Are you sure? Enable cycle time could be 500ns at 5V, look at page 52 of
>> datasheet[1].
> 
> Datasheet indeed says 500ns minimum. It ofcourse depends on the mcu what
> the actual timing is. 500ns is 'slow' for todays controllers, so I think
> you could do polling as long as you don't do too much else (depending on
> the speed of your mcu). But an interrupt may be a safer choice and makes
> other processing (outside irq) easier. But even with using an interrupt
> you have to make sure latency is small enough, especially if there are
> other interrupts.
> 
> 
>>> Beware that the E signal is high when data is valid. So I would look for
>>> the rising edge.
>>
>> Are you sure? Look at Figure 25[1], data are valid at the falling edge
>> of E signal.
>>
>> [1] https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
> 
> Both is true: data is valid when E is high, 

Immediately before the falling edge data must be valid, but they aren't 
valid immediately after the rising edge. So I don't think the sentence 
"data are valid when E is high" is correct.


> but with a small delay (Tddr
> and Tdhr), so data is still valid on the falling edge. 

So I think it's much more robust to read on the falling edge.


> But you must be
> very fast in your response, minimum Tdhr is only 5 ns. This would
> require an awfully fast interrupt response. 

I got the point and indeed is critical. Maybe rising edge is better, 
because most probably MCU set data bits and after make a pulse on E.


 >Setting an interrupt on the
> rising edge gives you another challenge: Tddr is 160ns max, so you may
> not actually read the data within 160ns of the rising edge of E. If you
> have a fast interrupt response, you may need to wait a little before
> reading.

Consider that the read operation for HD44780 will be a write operation 
for my interface. In other words, when a read operation is send from 
MCU, my interface should write on data bits.

Howevere your point is valid: my interface should write on data bits 
before Tddr, 160ns maximum, and this could be difficult.

Anyway read operations aren't usually used on this kind of applications.


> 
> Maybe an FPGA solution is easier for this problem. ;-)
> 
> have you already thought about the other end of the interface? How do
> you plan to get data to the TFT panel? And don't forget about the part
> in between, the frame buffer etc.

I will send data to a serial port.

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Convert 16x2 chars display to big TFT display pozz <pozzugno@gmail.com> - 2021-09-21 12:31 +0200
  Re: Convert 16x2 chars display to big TFT display Reinhardt Behm <rbehm@hushmail.com> - 2021-09-21 13:44 +0000
    Re: Convert 16x2 chars display to big TFT display pozz <pozzugno@gmail.com> - 2021-09-21 16:01 +0200
      Re: Convert 16x2 chars display to big TFT display Reinhardt Behm <rbehm@hushmail.com> - 2021-09-21 15:07 +0000
      Re: Convert 16x2 chars display to big TFT display Stef <me@this.is.invalid> - 2021-09-21 17:09 +0200
        Re: Convert 16x2 chars display to big TFT display pozz <pozzugno@gmail.com> - 2021-09-21 18:48 +0200
  Re: Convert 16x2 chars display to big TFT display Don Y <blockedofcourse@foo.invalid> - 2021-09-21 19:34 -0700
    Re: Convert 16x2 chars display to big TFT display olaf <olaf@criseis.ruhr.de> - 2021-09-22 06:04 +0200
      Re: Convert 16x2 chars display to big TFT display Don Y <blockedofcourse@foo.invalid> - 2021-09-21 21:38 -0700
    Re: Convert 16x2 chars display to big TFT display pozz <pozzugno@gmail.com> - 2021-09-22 08:49 +0200
      Re: Convert 16x2 chars display to big TFT display Don Y <blockedofcourse@foo.invalid> - 2021-09-22 00:58 -0700
      Re: Convert 16x2 chars display to big TFT display Rick C <gnuarm.deletethisbit@gmail.com> - 2021-10-01 21:52 -0700
    Re: Convert 16x2 chars display to big TFT display Rick C <gnuarm.deletethisbit@gmail.com> - 2021-10-01 21:40 -0700
  Re: Convert 16x2 chars display to big TFT display Michael Schwingen <news-1513678000@discworld.dascon.de> - 2021-10-31 14:42 +0000

csiph-web