serial LCD/SLCD question


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    24

    Default serial LCD/SLCD question

    I am writing a test program to learn how to write text and variable values to a serial LCD Screen, I am using melabs 20 character by 4 line serial lcd screen connected to PORTC.0 on the lab X-1 board. I was told that writing to a serial LCD is much like writing to a normal LCD, with the exception of using the SEROUT command instead of LCDOUT. But, when I try this, it says the line of code is a bad expression, it will work if I remove "DEC3" from the SEROUT command, but then it outputs the variable value as ASCII characters, instead of a numeric value. This is what I have so far:

    INCLUDE "modedefs.bas" 'Include mode definitions

    X VAR BYTE 'Declare x as a variable
    X=1 'Set X to 1


    LOOP: 'Beginning of main loop
    X=X+1 'Add 1 to x
    PAUSE 500 'Wait 500ms
    SEROUT PORTC.0, N9600, [$fe, $1] 'Clear SLCD screen and move
    'cursor to beginning
    SEROUT PORTC.0, N9600, ["X=",DEC3 X] 'Display value of X
    GOTO LOOP 'Do it all over

    END

    Thank you for your time,
    Matthew

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Try replacing the DEC with #

    Serout LCD, N9600, ["E/T ", # Time2,".", # Time1/10,10,13]

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    SEROUT doesn't support the DEC modifier. SEROUT2 does.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Jun 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Thank you, I have never used SEROUT2, is there anything different about using it?

    Thank you again for your time,
    Matt

  5. #5
    Join Date
    Jun 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Sorry for the double post,

    I did not notice the other reply, your suggestion worked perfectly, thank you.

    Matt

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. Replies: 8
    Last Post: - 22nd July 2008, 20:31
  3. Serial Question + General Review
    By Freman in forum General
    Replies: 2
    Last Post: - 20th June 2008, 22:27
  4. AN Question for "word" variable read The serial port
    By redfoen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th December 2007, 17:39
  5. newbie with serial com question...
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th December 2006, 05:34

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts