PDA

View Full Version : LCD serial



chip_select
- 14th March 2008, 21:44
Hi to everybody,
I use a serial LCD Devantech 4 xes 20 one wire connected to the usual pic.
When it begins working strange things to the characters happen: they appear of of it new, they skip in low they disappear then then aloft, it returns normal for a certain time, it illuminates him jerky when he is not programmed to light up.. What can the cause be?
thanks
chip_select

skimask
- 14th March 2008, 21:49
Not following your english very well.
Could you give a shot at rephrasing this a bit?

they appear of of it new, they skip in low they disappear then then aloft, it returns normal for a certain time, it illuminates him jerky when he is not programmed to light up.

chip_select
- 14th March 2008, 22:20
the display involves in strange way. it is unstable. characters that disappear or that are replaced. example:



'my code :

include "modedefs.bas"
loop:
serout portb.0,2,[" Good morning"]
serout portb.0,2,[12,1] 'clear display
goto loop


'the display

second: 1 2 3
Good moxxx g āoox morǼinx 17od morninx and so on..

skimask
- 14th March 2008, 22:24
Are you using the internal oscillator on the PIC? Might not be as stable as you think...
Also, try adding some CHAR_PACING (it's in the manual)...at 9600 baud, 5ms should be more than enough to keep a serial LCD happy.
Past that, try bumping down to 2400 baud and see what happens...

rhino
- 14th March 2008, 22:35
Why are you writing to it, and then in the next line of code, clearing the screen? .... Then looping through the same sequence???

mackrackit
- 14th March 2008, 22:49
Is this the display you are using?
http://www.robot-electronics.co.uk/htm/Lcd02tech.htm

chip_select
- 16th March 2008, 08:22
THX SKIMASK,

I have added : "define char_pacing 5 "
Now it works fine.

chip_select

Ron Marcus
- 16th March 2008, 12:43
So there is a baud rate speed mismatch between the PIC and the LCD. What oscillator speed/config are you using?

chip_select
- 16th March 2008, 14:57
Or INTOSC or Crystal 4Mhz whit 2 capacitor 22pF.

chip_select
- 16th March 2008, 14:58
Or INTOSC or Crystal 4Mhz whit 2 capacitor 22pF.
T9600 baud

mackrackit
- 16th March 2008, 15:09
What chip?
Can you post your whole code?
And post how your fuses are set. Either from the *.inc or in code or if you are using one of those programs that does it for you.