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.