Did you put a max232 or similar device between your LCD and PIC?
Ioannis
tried it with and without max works better without
does not seem to mater still get garbarge (some) also displays corectly
and unable to fiqure how to setup chip escape sequence
Last edited by jcleaver; - 20th February 2007 at 13:11.
It can't work with both cases (with and without max232) using HSER commands! Are you sure of what you are doing????
I never used any Serial LCD's so I don't know of the ESC sequences. But with Serout commands you can drive a PC without MAX232. I am not sure if you can drive a slave device too... I'd use a MAX232 for sure.
Ioannis
Last edited by Ioannis; - 20th February 2007 at 14:18.
If this: http://www.redbinary.com/sld01a.php is the LCD driver you're using, then it looks like you'll want to use 9600 non-inverted. It should also work directly connected to your PIC hardware USART pin.
I a getting the display to work with the attached file so i assume
hook up and baud is right
using serout2 commandportb.7 on a 628a not using the max works better
however i also get garbage and cannot get the esc sequence to change the display properties
file does not compile with the latest effort to send esc
tried others no help
where you have "<esc>" in your code, that generally means the ASCII character "Escape" similar to how you see "<cr>" for carriage return.
Try replacing that with 27 or $1B and see how you get on. (No difference between them except that 27 is decimal and $1B is hex.)
Last edited by keithdoxey; - 20th February 2007 at 15:32.
Keith
www.diyha.co.uk
www.kat5.tv
@9600 baud AND using the internal OSC AND using SEROUT2, it's high unlikely that it will work. Using DEBUG or HSEROUT may work.
with HSEROUT, use the following DEFINEs
For ANY reliable serial comm, you really want to use a crystal or a ceramic resonator.Code:DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1 DEFINE HSER_SPBRG 25 ' 9600 Baud @ 4MHz, 0.16% DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks