PDA

View Full Version : LCD help



HCSTechy
- 19th January 2006, 20:58
I am using a PIC16F84A pic and I am having LCD problems, I tried using a code that makes the LCD say "Hello World" and it doesnt work.
Can one of you nice people tell me how to fix this problem.

We've tried to use the code from the LCD manual to clear the screen, but it has a semi-colon so it declares part of the code as a comment/remark.

so we couldnt use that. We also tried using the code that was explained in the picbasic command book. But it didn't work either.
Any help would be greatly appreciated.

Dwayne
- 19th January 2006, 21:27
First off...

Can you verify your LCD is working?
Even by adjusting contrast to see dark squares, is better than nothing...

Then you must verify your chip is sending data propery...
You can use LED's on the port to make sure your data is being sent. If you send a "1", you had better see the binary "1" with the lit up LED's.

If the above is working, then you must make sure you initialize the LCD before using, and give a "pause" before sending commands to the LCD.
A pause 100 will give the LCD time to wake up.

What does your code look like? (I don't mean just a copy out of the book, but I mean what YOU used to program your pic with.).

Dwayne

HCSTechy
- 19th January 2006, 23:03
The LCD does work, when we make the circut and everything all that is shown is the name of the LCD (Matrix Orbital) and a strange character at the begining of the first line, the PIC works, we did other programs on it, and we also did a pause but not at 100, we might try that.

milestag
- 20th January 2006, 03:58
Matrix Orbital is a "serial" LCD I think??

Make sure you do NOT use the LCDOUT command. It only works with parallel LCDs. But that is where the "Hello World" example is in the PBP manual.

If it IS a serial LCD then you should use one of the SEROUT type commands to write to it.

Jim

HCSTechy
- 20th January 2006, 20:05
it is serial, and we already tried using the serout command.
This is the code we used:
Pause 1000
start:
SEROUT portb.1, 1, [254,1] 'supposed to clear screen
pause 40
serout portb.1, 1, ["hello world"]
pause 400
goto start
end

in the book for the lcd, it says that the command for clear screen is 254 88,
but it doesn't work either

Ioannis
- 20th January 2006, 21:01
How have you connected the Serial port of the PIC to the Serial input of the Display?

Have you used any rs232 converters like MAX232?

Ioannis

Dwayne
- 20th January 2006, 21:30
What you may want to do, is one of two things...

put a character spacing of 1000 (defined at top of program),

or instead of Looping to the very beginning. Loop to the output again...
You may be transmitting data too fast for the LCD to respond, and hit the clearLCD before bring printed.

using your code with a slight mod:

DEFINE CHAR_PACING 1000

Pause 1000
start:
SEROUT portb.1, 1, [$FE,1] 'supposed to clear screen
pause 40
Loop:
serout portb.1, 1, ["hello world"]
pause 400
goto Loop
end


Dwayne

HCSTechy
- 21st January 2006, 03:03
thanks dwayne,
i wont be able to try that until monday...
but I'll definetly let you know if it works

HCSTechy
- 24th January 2006, 20:13
no it didnt work
it keeps displaying a character that looks like two I's over and over again
but its at least doing something different than before

mister_e
- 24th January 2006, 22:03
be sure of your baudrate AND the way you need to send the data to your LCD. I mean Inverted or NotInverted

Wich crystal speed you use?
....

...


...

HCSTechy
- 26th January 2006, 20:20
We have tried everything, nothing works.

phan
- 1st February 2006, 00:25
I'm actually having the same problem as you do. I'm using the LCD2041, and nothing seem to work. My pic chip is the 16F876.
did you solder the pins on your LCD for TTL communication ?
let me know your latest findings

badrad
- 1st February 2006, 17:25
I'm actually having the same problem as you do. I'm using the LCD2041, and nothing seem to work. My pic chip is the 16F876.
did you solder the pins on your LCD for TTL communication ?
let me know your latest findings
you need to confirm which version of pcb you are using, their documentation does not always reflect the latest PCB version. I've used their GLC24064 - connected to 16F876A and 877A in TTL serial and have also tested with their I2C. Using TTL setup with the display, just make sure you do not invert the PIC serial signal.
BTW-the Orbital Matrix displays sometimes hiccups in it's receive buffers, and depending on your application, the display may occasionally wander off into oblivion. Check their forum, there are some threads about this.

badrad
- 1st February 2006, 17:27
sorry - timed out and wound up double posting the reply...

HCSTechy
- 7th February 2006, 20:07
We fixed the problem, thanx everybody.