[En-Nut-Discussion] ethernut board 3.1 LCD support
uprinz2 at netscape.net
Thu May 13 12:50:44 CEST 2010
You can go two ways:
Use the display out of the box and if it is a 5V display, use one of
TI's SN74AVCxxx series buffers for level adaption. But with EN3 the
simplest way is to use the CPLD and configure it for routing some
signals straight through, from input to output.
Second way is to find the 91k resistor on the displays PCB and replace
it with a 75kR type. Then the display can be driven with 3.3V. In worst
case you need to generate a slight negative LCD voltage to get a better
I didn't check for the memory setup of the AT91 series. If you can slow
down memory access enough and can configure one /CSx line for beeing
active-high you cann access the display directly as a memory instead of
going gpio way. If there /CS cannot be configured as active high, there
is an option to use one of these single-gates 74AVC12xG1 for inverting
/CS to E.
This way of connecting LCDs is only suitable for CPUs having a
data/address bus already routed to a connector. It doesn't mace any
sense for all other systems.
There are lots of ways to connect a display...
I do not think that there is any good reason for polling the Busy-Flag.
1) It needs a lot of time as the display thread blocks for the whole
time while polling. Other tasks may run out of time.
2) If you use NutSleep() to unblock other tasks while waiting, you do
not need to poll the display as, besides two commands, all are finished
long before the display task is back again. The two commands Clear and
Home can be exited with NutSleep(2) instead of NutSleep(1).
3) With a charater display there is no need to be fast. With my slowest
driver implementation (Using NutSleep(1) after each byte sent to the
LCD) an 40x4 LCD is updated completely after approx. 100ms. That are 10
complete refreshes in one second!
Don't chase birds with cannons :)
Best regards, Ulrich
Am 12.05.2010 09:12, schrieb Paul Govers:
> Hi Ulrich,
> Thats a good reminder that most of the IO is not 5volt tolerant!
> Iam happy that i yesterday have not read from the Dispay :-)
> I succeeded to control the display in 4-bit mode, yesterday only one
> character but the rest would be simple!
> I will have a look at the CPLD, because i want to read the display to
> know if the LCD is busy or not and i will take a look at level-shifters
> Does someone know ready for use/Plug and play level-shifters? (maybe a
> good product for in the egnite webshop!)
> Met vriendelijke groet / with kind regards,
> Paul Govers
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Ulrich Prinz
> Sent: Tuesday, May 11, 2010 7:55 PM
> To: Ethernut User Chat (English)
> Subject: Re: [En-Nut-Discussion] ethernut board 3.1 LCD support
> Hi Paul!
> Am 11.05.2010 10:30, schrieb Paul Govers:
>> Hi Ulrich,
>> Thats great that you working on an LCD driver for the ethernut 3.1
>> i will try tonight to get my LCD display working with my Ethernut 3.1
>> i have read the documentatie about the HD44780 and it seems not to
> I replaced the driver for AT91, it is not specialized on the EN 3.1 but
> it should work with all AT91 devices.
> It uses GPIO for all signals and, in this release, will not support
> reading from the display. And this is something you might want, as the
> CPU on the EN 3.1 has no 5V tolerant pins. Reading without
> level-shifters will destroy the CPU if the display is driven with 5V. On
> the other hand you might use the CPLD as a level shifter, it is 5V
> tolerant even driven with 3.3V or less.
> I think I don't have time tonight for checking in my driver, but I will
> do it tomorrow night for sure. I actually think for adding another
> access method, the memory interface. I didn't check the data sheets of
> all AT91 if they can be programmed for such slow memories and if they
> are able to drive an active-high chip select.
> Best regards, Ulrich
More information about the En-Nut-Discussion