Trouble with Lcdout


Closed Thread
Results 1 to 4 of 4
  1. #1
    Tomexx's Avatar
    Tomexx Guest

    Default Trouble with Lcdout

    Hi,
    I have a keypad and an LCD.
    My keypad's scanning rutine returns a key (0 to 9).
    I'd like to display each digit (as I press the key on the keypad) next to the previous one.

    For example:
    After pressing digit 3 the LCD will read: 3
    Then I press digit 6, the LCD now reads 36
    then I press digit 4, the LCD now reads 364 and so on


    For some reason I can't do that. I've only been able to display one digit at a time by clearing the display first:

    Code:
    Lcdout $FE, 1, #key
    but I really want to show them together as they're being pressed.

    Please help

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You've done pretty much OK... just rearrange things a little...
    Code:
    Start:
    	LCDOut $FE,1
    KeyLoop:
    	Gosub GetKey
    	LCDOut #key
    	Goto KeyLoop

  3. #3
    Tomexx's Avatar
    Tomexx Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Melanie.

    I didn't know that you could skip the "$FE" command when sending data using Lcdout.

    BTW, do you have a complete list of LCD commands for use with Lcdout? (I only have the ones from PBP manual and Google couldn't help me).

    Tom

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    all the special command to use with LCDOUT are in the PBP manual.

    $fe,1 clear display
    $fe,$c0 jump to 2nd line
    etc

    so LCDOUT $FE,1," hello "

    will clear the display an write hello

    LCDOUT $FE,1,"line 1",$FE,$C0,"line 2"

    will clear the display and write line 1 on the first line, line 2 on the second line of your LCD.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  2. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 02:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

Members who have read this thread : 1

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