PDA

View Full Version : Help LCD



jetpr
- 27th April 2008, 17:43
My Controler (Pic18f2620)
I am Sending Data from one Pic to my LCD with Other Pic but is no Working..

SerOut LCDScreen, T9600,[LCDCmd,LCDLine1," TEST "]

------------------------------------------------------------------------------
is not displaying nothing

LCD Code (pic16f688)

INCLUDE "modedefs.bas"
OSCCON=$70
DEFINE OSC 8
define LCD_DREG PORTC
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 5
DEFINE LCD_EREG PORTA
DEFINE LCD_EBIT 0
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
BO VAR byte

ANSEL=0
CMCON0=7
LOW PORTA.4
LCDOUT $FE,1,"LCD 2.0v" (Work ok)
pause 500
HIGH PORTA.2 'Back LED
LCDStart:
serin PORTC.5,T9600,BO (no Wotk)
lcdout BO
goto LCDStart

mister_e
- 27th April 2008, 18:21
Did you tried with a slower baudrate like 2400 bauds?

on the Pic18f2620 side, which osc speed are you using?

Are you sure LCDScreen pin is not an open collector type?

any chance to see some code snip of your PIC18F2620 side?

When you say nothing work... you mean absolutely nothing.. not even some garbage character?

jetpr
- 27th April 2008, 18:41
Yes it work the lcd but all character i send to lcd does not respond

the only i see is black blocks.

sayzer
- 27th April 2008, 19:43
Seems to be a contrast issue to me.

=========================

mister_e
- 27th April 2008, 19:54
Could be... but it doesn't explain why the first LCDOUT works huh? ;) Well that's what my half-smart brain tell me :D

I feel a baudrate issue, timing issue... never dared to calc the amount of time required for a LCDOUT and to receive a BYTE though. I may try it... later

I tend to use USART so far... this 2 bytes buffer is often handy...