|
From: J S <g1p...@ya...> - 2005-06-19 14:18:01
|
Hi Peter
--- Peter <pl...@ac...> wrote:
>
> Did you try to send data as I wrote, using TI checks
> ?
Yes, this is the code I used for putchar:
void putchar(char ch)
{
while(!T1) ;
T1=0;
SBUF=ch;
}
I had to change it a bit from what you wrote because
the header file from sdcc defined putchar as void with
a char input.
> According to the
> datasheet if you did this then it should work. Try
> to send a 0x14 (shift
> cursor right) between each character and see what
> happens.
Yep, already tried it. It didn't have any affect
though.
> Your serial
> lcd could have a bug. When programming standard lcds
> then your problem
> occurs if one does not set the lcd mode to
> auto-increment on write. That
> would be a firmware bug in your case. Try to send
> 0x1b 0x43 (enable
> scrolling) then send data bytes, see what happens.
Ok, just tried this, but now I'm not getting anything
on the screen except the cursor.
> There is one more way
> to enable auto-increment on write, as a last resort:
> 0x11 0x18 0x11 0x04
> . When you send these bytes, and in fact ANY bytes
> to SBUF, you wait for
> TI between them as shown in my previous email, ok ?
Yup, I have the T1 check setup in putchar and similar
for any other time I use SBUF. However, I think this
is where the problem is. I think it sends out the
first byte, then when it goes to the second byte, it
stays in the loop checking T1. This can explain why I
only see the first character now. Not sure why its
doing this.
Thanks,
J Silverman
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|