LCD SEROUT2 help


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Location
    Fort Collins, Colorado
    Posts
    8

    Default LCD SEROUT2 help

    Hi all,
    I have a serial LCD connected to a 16F88. I can get things to display on the LCD if I write the code like:

    Code:
    SEROUT2     lcd,396,[$FE,1,"Test"]
    But I am lost on how to get a variable to display.

    Code:
    SEROUT2     lcd,396,[$FE,1,variable]
    The end result I'm looking for is getting an RFID tag number from a reader and display that tag number on the lcd. I'm using a parallax RFID reader.

    Thanks for any help,
    Josh

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Code:
    SEROUT2     lcd,396,[$FE,1,#variable]
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2008
    Location
    Fort Collins, Colorado
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I got this code to work:

    Code:
    DEFINE OSC 8			'Internal Oscillator set to 8mhz
    OSCCON.4=1
    OSCCON.5=1
    OSCCON.6=1
    
    ANSEL=0				'Turns off A/D converter
    
    lcd	Var PORTB.5
    
    tag1	Var	BYTE
    
    Pause 500
    
    SEROUT lcd,0,[$FE,1]
    
    Pause 200
    
    SEROUT lcd,0,[$FE,1,"Test"]
    
    Pause 2000
    
    SEROUT2 lcd,396,[$FE,$C0,"2nd Line???"]
    
    tag1=123
    
    SEROUT2 lcd,396,[$FE,$94,DEC tag1]
    But now I'm trying to get a ten digit number to display, something like

    1000504B02

    and i keep getting errors.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    How are you storing this 10 digit number? In an array?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2008
    Location
    Fort Collins, Colorado
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I'm not really sure how to store it, I tried just putting
    Code:
    tag1=100050A4B7
    But it truncates and displays only "FF"

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The easy way would be
    Code:
    tag1	Var	LONG
    If you are using PBP 2.50

    Otherwise I would say you need to store it an array.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Serout and 18F87J50
    By Glenn_Webber in forum Serial
    Replies: 8
    Last Post: - 20th November 2009, 14:26
  2. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 02:38
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. Gps with 16f628
    By dragons_fire in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th June 2006, 03:38

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