
Originally Posted by
jcleaver
they do shoot horses
? hserout does not work on the 627a why no usart on this ?
??? The 627 does have a USART. the 627/628/648 are the same apart from 1k/2k/4k memory
serout 2 works using the max but data is garbled ? see attached file
Just looked at the link posted earlier by Bruce. The driver chip you have is a 16F627A according to the schematics on the website so just connect the TX of your PIC to the RX of the LCD driver and comms should be perfect.
It would seem that unlike a lot of Serial LCD backpacks, this chip is trying to be clever in so much as it wants to just display any serial data it receives....
LCD Formatting
The LCD can be configured for a specific number of columns and lines with two additional escape sequences.
The desired number of columns is set by first sending the escape character, then a lower-case 'x', followed by two digits specifying the number of columns allowed before the SLD01a forces a line-break.
The LCD line count is specified in a similar manner - escape, lower-case 'y', and two digits.
Two digits must be used, even when the number of lines can be represented with one. For example, to set the SLD01a into a 16 x 2 format you would send "<esc>x16<esc>y02"
The LCD configuration is saved in the SLD01a EEPROM which is persistant even when removed from a power source. This makes it only necessary to configure the SLD01a once for any given LCD format.
Non-Text Characters & Escape Sequences
When either non-printable linefeed or carriage return character is received the SLD01a will line-break by causing the LCD cursor to move to the first character placement on the next line of the display. After the last character of the last line is reached, the SLD01a will clear the display and begin again at the first character of the first line.
When the non-printable delete character is encountered, the SLD01a will reposition the LCD cursor one position to the left, deleting the last displayed character.
When the non-printable bell character (ASCII 7) is encountered the aux pin (pin 6) will briefly energize. This is the same procedure as the 'b' escape sequence.
Proprietary escape sequences allow for some additional features. All escape sequences are triggered by sending the escape character (ASCII 27 [0x1B]) to the SLD01a. Table 1 lists the single character escape sequences recognized and the functions that they perform.
CHR DESCRIPTION DEC HEX FUNCTION
c lower-case C 99 63 clear LCD screen and place cursor at home position
b lower-case B 98 62 briefly energize the auxillary output (pin 6)
O upper-case O 79 4F turn auxillary output on
o lower-case O 111 6F turn auxillary output off
L upper-case L 76 4C turn LCD backlight on
l lower-case L 108 6C turn LCD backlight off
To me at least, that says it wont understand the LCD positioning commands you are trying to send it.
MY interpretation is that once powered up and told how many characters and how many lines there are to the display (which it will remember forever) it will then start to print from the home position until the first line is full then it will print on the next line until it reaches the end when it will clear the display.
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks