SerLCD2.5 w/ LPC2106 - anything I need to know?

Hey guys,

I need help with the LPC2106 / SerLCD pairing. I know this should be simple, but it’s not working and it’s making me a little crazy. I’ll be playing with it this weekend, but any ideas you guys have will help greatly.

Here’s the deal:

I’ve been working with the LPC2106 demo board here from SparkFun, and I love it. I finally got the Eclipse / GCC toolchain working, and I can program the crap out of this red LED. I got the UART0 working, and now I’m trying to interface the serial-enabled LCD display found here: http://www.sparkfun.com/commerce/produc … cts_id=462. I got the device, and it looks great. I can turn it on with a 5V power supply (different from the main LPC2106 power supply, which is on a 9V wall wart. I’ve got a separate 5V wall wart for the display. I have it wired as follows: “5V” and “GND” go to the smaller wall wart. “RX” goes back to the LPC2106, jumped to the same Tx0 used for UART0. I know UART0 works, but I’m wondering if there’s something strange going on with that MAX chip.

To clarify, I have the LCD panel hooked directly to Tx0 (pin P0.0), NOT the MAX output pin for RS232. But the MAX chip shares that same line (P0.0) as an input pin for level translation for the RS232 signal. Another funny thing I noticed is that when I use the Phillips Flash Utility to program the board, I see random characters stream across the LCD screen. It really looks like that MAX chip is interfering somehow.

I originally tried to write a string to the LCD at 19200 baud, but then realized that its default is 9600 baud. I changed the UART’s baud rate, but that didn’t seem to help.

I’ve looked on other forums, and other posts here. Everyone seems to be using this LCD with PIC processors, Basic Stamps, or even the Arduino. I’m wondering if there’s some trick to using this thing with the LPC2106.

For example - should I use it on UART1 instead of UART0 since there’s no other circuitry (i.e. the MAX232 chip) attached to those pins?

Has anyone done this before?

Thanks in advance!

eewestcoaster:
To clarify, I have the LCD panel hooked directly to Tx0 (pin P0.0), NOT the MAX output pin for RS232. But the MAX chip shares that same line (P0.0) as an input pin for level translation for the RS232 signal.

The Tx0 can't be both an input and an output. Look again.

I looked at the schematic and TX0 just feeds the input of the MAX3232. It also goes to the pin headers for your use as GPIO, TXD0 or PWM1.

If you’re on the “TTL” side of the chip (you are) then it should work. The chip shouldn’t affect that working, I wouldn’t think.

Did you remember to use PINSEL0 to set your UART pins to be UART pins, rather than the default GPIO? If you didn’t then it’ll never work.

Make sure both boards have a common ground connection too.

I originally tried to write a string to the LCD at 19200 baud, but then realized that its default is 9600 baud. I changed the UART’s baud rate, but that didn’t seem to help.

Be sure your LPC2106 is running at the clock rate (look at PLL too) you think it is before calculating your baud rate. If it's not running at the speed you think it is then your baud rate will be wrong and it won't work. This one got me earlier. Thought I was running at 3MHz PCLK, but was actually running at 30MHz PCLK.

Another funny thing I noticed is that when I use the Phillips Flash Utility to program the board, I see random characters stream across the LCD screen. It really looks like that MAX chip is interfering somehow.

Normal. Does it flash the chip correctly with the LCD connected? Probably does, but otherwise you may need to remove the LCD while flashing.

The LCD is just trying to display the data being sent to your chip while flashing it. Of course it’s “junk” to an LCD and also the LCD hasn’t been properly initialized, so it displays gibberish.

Well that’s weird.

I wired it up such that both the LCD board and my board share a ground and the display behaved just a little differently. I can’t really describe it, but it looked a little different. Still didn’t work though.

So I unhooked the LCD panel from the board and just went back to the UART connection to the PC to prove that it still worked. It does, but I can’t seem to make any changes to the program. I can change the code, build it and download. The flash utility says it burned properly, but the program on the chip never changes. It still displays the line of text I programmed into the board yesterday, at the old baud rate - even though I’ve made the requisite changes to the code.

It’s like the LCD board damaged my LPC somehow, but I think that’s a little premature. The flash utility doesn’t complain, so I guess it’s alright.

This is far too strange for my teeny little brain tonight, so I’ll tackle it later. Suffice to say I’m out of the scope of this thread. Thanks for the suggestions, I’ll certainly revisit them when I get the board working again.

Thanks!

Got it.

Apparently I had to forcibly ‘Clean’ the project a couple times, and reboot. When I came back to it the next day I could make changes again.

As for the LCD panel, I think my settings were right - I just needed to pay real close attention to the details (UART1 vs. UART0, for example). Just remember that the LCD defaults to 9600 baud.

Thanks for all the suggestions. Once I got the compile / download issue resolved, they helped a lot.