picaxe to lcd interface and programming

peter howarth

New Member
is there anyone on the picaxe forum that has a DEFINITE,WILL WORK schematic diagram of a picaxe interfaced to an lcd display module , 16 x 2 character type, hitachi 44780 or its common equivalent, and also programming code, because as yet no one but no one has come up with a picaxe to lcd circuit and code listing that works without any hiccups..
 

AllyCat

Senior Member
Hi,

Probably not, because there are too many "Unknowns". Firstly, Which PICaxe? Not just the number of pins, but some are "faster" than others. Then there are various versions of the Interface to the HD44780. The "Normal" interface has about 16 "parallel" pins, 8 are a data bus, a few "control" lines, the power supply and backlight, etc.. Then there are the I2C "backpack" versions using an I2C expander, which has even more connection variations, using a "4-bit data" mode instead of the "normal" 8 bits.

Has (Inglewood) Peter forgotten to include his link? But the 6 + 2 wires implies a 4-bit parallel data mode. A half-way house between the I2C and 8-bit parallel modes, but debatable whether that's a good or bad (hardware versus software) compromise. ;)

Cheers, Alan.
 

Flenser

Senior Member
Peter,

I just connected a 16x2 character 44780 type LCD to my 18M2 chip using the code and instructions in this post by inglewoodpete and it worked first time.

I first followed the instructions in the first two sections of this Ladyada tutorial:
- Follow fhe instructions in the section "Power and Backlight" to get the backlight working.
- Follow fhe instructions in the section "Contrast Circuit" to display a line of rectangles to confirm the contrast adjustment was working and that my contrast pot setting was correct.

There is no point proceeding any further until you confirm you can display a line of rectangles.

I connected the LCD RW pin to gnd (this is not covered in inglewoodpete's post #1 which he later explains is because his LCD has the RW pin already soldered to ground.)

I did changed the oLCDxx symbols in the code so that all were on port B because I did not want to use the C.0 or C.1 pins on the 18M2 chip.

I then connected the LCD pins D4-D7, RS and En to the Port B pins I had chosen, downloaded inglewoodpete's code and got "Hello World!" displayed straight away.

Lots of people do get LCDs working successfully but if you get one pin connection wrong then it won't work, which is frustrating.
 

J G

Active member
Lots of people do get LCDs working successfully but if you get one pin connection wrong then it won't work, which is frustrating.
The thing I've found with these lcds is that once you get them working, they tend to keep working bar intermittent connections and become so easy to use that they leave you scratching your head as to why it was so hard to get going in the first place :).
 

premelec

Senior Member
I salvaged some 2x24 LCDs from Rolm phones and the edge connections were not in same physical and electrical order they seemed to be... watch out...
 
Top