views:

372

answers:

2

I am writing an embedded application in which I need to display a digit on LCD.

There must be some pre-existing libraries available doing the same. Or is there some reference code in C-language that could be referred?

Microcontroller is ARM based LPC2378.

+5  A: 

In a now-deleted comment, it seemed like you are using the KEIL break-out board MCB2300.

I found these MCB 2300 schematics on the KEIL site. These indicate that P1.24 - P1.31 are wired to the LCD module. This LCD module uses the same interface as the HD44780 in "nibble mode."

I found some sample code on a blog named "Embedded Microcontroller Programming" where a developer named Doug has nicely explained how he interfaced an LPC2300 chip to another LCD module with the same interface (nibble HD44780). Remember as you port this code that this article assigns the ARM GPIO pins P2.0-P2.5 to the functions the KEIL MCB 2300 assigns as P1.24 - P1.31.

Another article at HobbyRobotics.com covers the protocol again but does not implement the ability to read LCD registers (the R/W* pin is wired to ground). The coverage of the protocol there has nice logic signal timing diagrams.

KEIL     Embedded    Hobby    HD44780
MCB      uController Robotics Function
2300     Prog.  
-----    --------    -------  ------
P1.31    P1.22       P2.4     E   (Enable/Chip-Select)
P1.29    P1.25       Gnd=W    R/W* (Bus Read/Not-Write)
P1.28    P1.23       P2.5     RS  (Registers Select)

P1.24    P1.27       P2.0     D0 (aka DB4)
P1.25    P1.20       P2.1     D1 (aka DB5)
P1.26    P1.26       P2.2     D2 (aka DB6)
P1.27    P1.21       P2.3     D3 (aka DB7)

Notice how each context has different pin assignments which are representations of the actual wires which connect the MCU to the LCD.

Heath Hunnicutt
A: 

More many different alphanumeric types ,graphic types, give you plenty to chose from- 1x8 to 4x40 character displays ,122x32 to320x240 Graphic displays. Standard backlight options of low-power electroluminescent, high-brightness EcoBrightTM non-powered backlight by special order. LED or CFL backlights, low profile edge light options for thinner displays. Standard or wide-temperature (-20°C to +70°C) operation. All parts can include an HD44780 compatible controller which can be ordered in either: Standard, European, Cyrillic, Russian, or Greek font options. www.cn-aoran.com

AORANLCD