Hi again, and thanks for your rapid reply
>>text on the LCD i ALWAYS get a weird character(seems to be char code:
>> >10110101) and even when i do a display clear or cursor home i cant get
>> >to the first position of the LCD. Is my code wrong or have you
>> >experienced this on your own?
>
>Exactly WHERE is this character appearing? In the middle of your display?
>Before the first desired character is written? At the end of the message?
>I'll assume it's at the beginning of your message.
Sorry, its in the beginning yes...
>
>You have to ensure that the "E" bit is clear before you begin writing. I
>can't be sure that it is from the code you submitted. If it isn't, then
>your command line would not be sent until it's toggled again, which would be
>the next character. This would make your first character/command garbage.
>Try:
>
I can submit the whole code if thats better?
The LCD_E bit isnt set, its cleared from the very beginning of the program
{Quote hidden}>bcf LCD_CTRL, LCD_E
>
>> movwf lcd_cmd ; the command is in W, just save it
>> bcf LCD_CTRL, LCD_RW ; setup for command recieve
>> bcf LCD_CTRL, LCD_RS
>> bsf LCD_CTRL, LCD_E
>> movf lcd_cmd, 0
>> movwf LCD_DATA
>> nop ; pulse must be wider than 450ns, is not necessary for fast clocks
>> bcf LCD_CTRL, LCD_E
>>
>> return
>
>Looks like you're using Peter Ouwehand's routines. Never used them myself,
>but I assume they'd work. Note that in his routines, he calls LCDBUSY
>*before* he tries to write to the display. This routine automatically
>leaves the "E" bit clear.
>
Who is Peter Ouwehand? :-)
{Quote hidden}
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspam
.....mitvma.mit.edu with SET PICList DIGEST in the body