Shop OBEX P1 Docs P2 Docs Learn Events
LCD and SX48 — Parallax Forums

LCD and SX48

JDOhioJDOhio Posts: 72
edited 2006-09-29 01:54 in General Discussion
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

Comments

  • BeanBean Posts: 8,129
    edited 2006-06-13 00:12
    Joe,
    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
    ·
  • JDOhioJDOhio Posts: 72
    edited 2006-06-13 00:36
    Thanks for the quick reply!

    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
  • BeanBean Posts: 8,129
    edited 2006-06-13 00:49
    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
    ·
  • JDOhioJDOhio Posts: 72
    edited 2006-06-13 01:14
    Thanks! Here's the complete program. In my source, I use an INCLUDE so it is in assembly.

    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
  • BeanBean Posts: 8,129
    edited 2006-06-13 01:53
    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
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-13 02:03
    Joe,

    ·· 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
  • JDOhioJDOhio Posts: 72
    edited 2006-06-13 22:04
    Thanks for your help, Bean!

    Thanks for your help, too, Chris! I called Tech Support and they had a ready solution. The display operates as expected now.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2006-09-28 14:48
    JDOhio,
    what was the solution?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • JDOhioJDOhio Posts: 72
    edited 2006-09-29 01:54
    Parallax Support had me remove a resistor on the back of the display. I believe it is at the bottom of the contrast pot where there are three resistors. I think I removed the one at the right. I was able to remove with a soldering iron. I recommend you verify this with Parallax Support - they were very helpful.

    Joe
Sign In or Register to comment.