16x2 HD44780 LCD Library

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

16x2 HD44780 LCD Library

2,813 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by btheuma on Thu Sep 17 03:35:52 MST 2015
Does anyone have a 16x2 HD44780 LCD library which works for the LPC11xx series please ?
Labels (1)
0 Kudos
Reply
4 Replies

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Sat Sep 19 10:01:09 MST 2015
Easy on an LPC1224 because the pins run sequentially.
Absolute pain on an LPC11xx  - wiring up enough pins to make an 8-bit parallel port is a nightmare given the LPC11xx pinout.
I have taken to using the LPC15xx when I need an LCD display simply because there are 8 pins in a row (PIO0_24 to PIO0_31)

Because the display IC has active-all-the-time pull-ups, the easiest way to drive it is to configure the port as open-drain. This saves endlessly having to rewrite the DIR register.

I have code in assembler if you are interested.. . .
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Nathael on Fri Sep 18 04:01:58 MST 2015
Best way is to clone the repository using Git

Under Linux, run the following command once git is installed :
git clone http://gitclone.techno-innov.fr/modules

If you want to browse the source tree online, use the "tree" link from the summary page :
http://git.techno-innov.fr/?p=modules;a=summary

the one at the top is the tree to the current head of the repository, while those on each commit line is the tree at the time of the commit.

You can also get the snapshot of the latest source by using the "snapshot" link at the end of the lastest commit line (top of the list). It will propose an archive download.

+++
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by btheuma on Fri Sep 18 03:59:16 MST 2015
Thanks!
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Nathael on Thu Sep 17 04:56:01 MST 2015
Hi,

I recently made the support for these devices for my project.
You can find the sources here : http://git.techno-innov.fr/?p=modules;a=summary
Clone  :
git clone http://gitclone.techno-innov.fr/modules

The driver is in extdrv/lcd_char.c with the header files in include/extdrv/lcd_char.h
You have an example in apps/base/lcd_char/ which shows support of two displays at the same time, one with 16x2 connected in 4bits mode and one 20x4 connected in 8bits mode.

You can see it used here :
https://plus.google.com/109003741957441911395/posts/LNhyZGaD9kj

The code is for a LPC1224 but the LCD support part should be used on any LPC with little modifications.

If you need LPC11x support, I'm currently working on LPC11U35 support : http://git.techno-innov.fr/?p=lpc11u3x;a=summary
The lcd_char is not included in it, but this provides the very same API so you should only have to copy lcd_char.* files to get it working.
The API definition is not yet available, you will have to refer to the source code, but I try to add as many comments as possible, and use easy to understand variable names.

If the LPC11U35 code does not run on your LPC11xx have a look at these files :
core/bootstrap.c : check the interrupts order/name and adapt to your LPC
core/pio.c : Check that all your pins are in the pio_regs_handles_port* arrays (and change the number of pins for the port in the header file).
include/core/pio.h : check for the pins/functions definitions.
include/core/lpc_regs_11u3x.h : adapt to your LPC registers. For a LPC11xx there should be little modifications. Maybe also change the name (must be propagated in all the other files).
Eventually the core/system.c code if your LPC is very different, but I doubt that.

Have fun.
+++
0 Kudos
Reply