LCD and SX48
I am attempting to use the Parallax Serial LCD (2x16) with the SX48 protoboard. I have the LCD powered and it receives characters from the SX48. I am sending 22 characters so I expect to see the text wrap. However, in the second line, four characters are missing.
I included code but have not included set up code.
HIGH RE.7
PAUSE 100
SEROUT RE.7,T9600,$0c
PAUSE 250
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
SEROUT RE.7,T9600,"7"
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
SEROUT RE.7,T9600,"7" 'starting here, characters are missing
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1" 'starting here, characters display again
SEROUT RE.7,T9600,"2"
Joe
I included code but have not included set up code.
HIGH RE.7
PAUSE 100
SEROUT RE.7,T9600,$0c
PAUSE 250
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
SEROUT RE.7,T9600,"7"
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
SEROUT RE.7,T9600,"7" 'starting here, characters are missing
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1" 'starting here, characters display again
SEROUT RE.7,T9600,"2"
Joe
Comments
Most likely the LCD is missing characters as it moves to the next line.
Try putting a PAUSE 10 after sending the "6" and before sending the "7"
HIGH RE.7
PAUSE 100
SEROUT RE.7,T9600,$0c
PAUSE 250
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
SEROUT RE.7,T9600,"7"
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
SEROUT RE.7,T9600,"3"
SEROUT RE.7,T9600,"4"
SEROUT RE.7,T9600,"5"
SEROUT RE.7,T9600,"6"
PAUSE 10
SEROUT RE.7,T9600,"7"
SEROUT RE.7,T9600,"8"
SEROUT RE.7,T9600,"9"
SEROUT RE.7,T9600,"0"
SEROUT RE.7,T9600,"1"
SEROUT RE.7,T9600,"2"
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"I reject your reality, and substitute my own." Mythbusters
·
I tried 10, 100, and 1000 ms after sending "6", and they all had the same result (i.e., missing characters). I agree that the LCD may be missing characters. I tried the same code using T2400 with the same result.
Joe
I have one of the Parallax 2x16 Serial LCDs. I tried your original program on the SX28 using RA.0 on the Profession Development Board. It worked with no problems (without the pause). The first line reads "1234567890123456" and the second line reads "789012".
Can you post your COMPLETE program ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"I reject your reality, and substitute my own." Mythbusters
·
DEVICE SX48,OSCHS1
FREQ 50000000
PROGRAM Start
Start:
INCLUDE "PortConfig.src" ;this is the following code
;============================
;
;Port Configuration
;
;============================
;MODE Valid Values
MODELogicLevel EQU $0d
MODEPullUp EQU $0e
MODEDirection EQU $0f
;Configure Ports
; LOGIC LEVEL
MODE MODELogicLevel
;Port E
mov !re,#%00000000 ;all TTL
; PULL UP
MODE MODEPullUp
;Port E
mov !re,#%10000000 ;pull ups on inputs
; DIRECTION
MODE MODEDirection
;Port E
mov !re,#%01111111 ;re.7 is an output
mov re,#%10000000 ;all inputs low
'
'the original code goes here
'
LOOP1:
GOTO LOOP1
Joe
It's not a good idea to use assembly to configure the ports. Because SX/B need to keep track of things.
That said, I don't really see anything obvious...If the 1st 16 characters get sent fine, I don't see why the display would "lose" 4 characters consistantly ???
If you have a Basic Stamp, I would try using that to if that works okay.
One possibility is that the serial controller "thinks" you have a 2x20 display ???
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"I reject your reality, and substitute my own." Mythbusters
·
·· Contact Parallax Technical Support directly tomorrow on this and we'll see what we can do.· Or send an e-mail to support@parallax.com· Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks for your help, too, Chris! I called Tech Support and they had a ready solution. The display operates as expected now.
what was the solution?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
Joe