Help with LCD commands with button I/P


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Thanks Steve,


    I now have one line with one word, which changes when I toggle the i/p. (great just the job)
    Do you know why I get no change when i toggle the other i/p.
    Line 2 stays blank.

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


    Did you find this post helpful? Yes | No

    Default

    Yes i know... look how your program flow...

    it goes to Disp1 or Disp2.. then it return to Loop... knowing that SW1 can't something else than 0 or 1.. it will never execute the IF SW4 = lines.

    I would suggest to use GOSUB and RETURN for a quick fix.. and be careful with LCDOUT $FE,1 line in DISP3 & DISP4 routines...

    Still possible to use another method...
    Steve

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

  3. #3
    Join Date
    Oct 2007
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Thanks I will give it a try,

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


    Did you find this post helpful? Yes | No

    Default

    you could still use something like..
    Code:
    Loop:
            IF SW0=0 THEN
                    '  Paste your Disp1 stuff here
                    ELSE
                                    ' paste your Disp2 Stuff here
                    ENDIF
    
            IF SW4 = 0 then
                    ' Pate your DISP3 stuff here
                    ELSE
                                    ' paste your DISP4 stuff here
                    ENDIF
    
            GOTO Loop
    Steve

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

  5. #5
    Join Date
    Oct 2007
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    Sorted.

    I just inserted a cupple of goto's and returns and It works fine on both lines now,

    Many thanks for you and all for your help and advice,

    Just one last thing, do you know of where I can get a list of lcdout $ commands as I would like to insert extra info togged by unused i/p's


    Thanks
    Dave...

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


    Did you find this post helpful? Yes | No

    Default

    The PBP manual has some. What are you looking for exactly?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Oct 2007
    Posts
    35


    Did you find this post helpful? Yes | No

    Default lcd commands wanted

    I am looking for the lcdout commands, so I am able to send text to any position on a two line display,
    Say, 1 command at the beginning of line 1 and another at the end of line 1

    cheers
    Dave..

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


    Did you find this post helpful? Yes | No

    Default

    Thats easy. Look in the manual for full explanation.

    Code:
    LCDOUT $FE, 80 ' First position of line one
    LCDOUT $FE, 80 + 4 ' Move over 4 places to the right
    Same works for the second line where $C0 is the first position.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  3. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  4. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

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