Ncurses and HD44780 LCD

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hey everyone,

I'm working on a project with a 4x20 HD44780-compatible character LCD
which is used to display a menuing system.  I'd like to use Ncurses to
handle the display output to this LCD, but I'm not sure if this is
possible.  Can anyone provide some tips on how to do this?  What
functionality does the driver need to provide?  Is a simple char
device sufficient?  Do I need to write a TTY driver for it?  How do I
redirect the Ncurses output to the LCD device instead of stdout?  Any
advice is greatly appreciated.

Cheers,
Alex


Re: Ncurses and HD44780 LCD
Quoted text here. Click to load it

Here's some code that might help.  It's a HD44780-compatible driver for
the Technologic TS-7xx0 boards.  I patched it to provide some ANSI
support and jj fixed my patches.  It's definitely beta but you're
welcome to use it.

Please provide comments/patches/kudos/flames either to me (remove the
obvious from my email above or to jj (his contact info should be in the
tarball.)

http://www.comp.leeds.ac.uk/jj/linux/lcddansi-0.4beta.tgz

--Yan

Re: Ncurses and HD44780 LCD
Quoted text here. Click to load it




My email is valid.
Get in touch if you want hints on changing the code etc. Unfortunately
it doesn't emulate the complete ANSI codes. But I can add stuuf.

The main problem is that I'm not too sure it works with 4 line displays.
I've never had one to try out and test with.

cheers
Jim

----------------------------------------------------------------------------
HomePage:    http://www.comp.leeds.ac.uk/jj
TS7200 Page: http://www.comp.leeds.ac.uk/jj/linux/arm-sbc.html

Re: Ncurses and HD44780 LCD
Quoted text here. Click to load it

Thanks.  I already had a basic driver complete, but I was unaware that
I needed to implement ANSI escape sequences.  That tip was exactly
what I needed.  I've added the relevant sequences and it's now working
nicely with Ncurses.

Now that I've got the LCD up and running, I'd like to print a welcome
message as early in the boot process as possible.  Can anyone provide
some advice as to how I'd go about doing that?

Thanks,
Alex


Re: Ncurses and HD44780 LCD
Quoted text here. Click to load it

Care to share?  Seriously, it would be nice to have an ncurses-capable
screen.

Quoted text here. Click to load it

Depends on your boot sequence.  I'm pretty sure you could patch redboot
to stuff a logo out.  Otherwise add a routine to the kernel to do that
on boot.

If you're in userspace (as in our driver) then there's not much you can
do except wait for the kernel to boot.

--Yan

Re: Ncurses and HD44780 LCD
Quoted text here. Click to load it

Well, I haven't made the code very portable at this point, since I was
only intending it for this application, but I'll have to talk to my
employer to make sure it's okay for me to release it.

Quoted text here. Click to load it

I'm working on patching U-Boot with a driver now, though I was
sidetracked for a while as I somehow screwed my toolchain up.

Alex



Site Timeline