LCDout Command causes Interrupt!!??


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    I have tried a few things - thanks for the reply. What seems to have worked is turning off Timer0 all together..

    T0CON = 1

    .... Seems to keep the LCD from triggering the interrupt / timer whichever it was!!

    NOW THAT IT WORKS, I have another issue seems to be that the LDCout command is not displaying the first character --

    LCDout $fe, 1
    LCDout $FE, $C0
    LCDout $FE, "P:",#Dec_mb dig 4,#Dec_mb dig 3, #Dec_mb dig 2,#Dec_mb dig 1, ".",dec1 Dec_mb,"F:",#Dec_tempf dig 3, #Dec_tempf dig 2,#Dec_tempf dig 1, ".",dec1 Dec_Tempf

    Displays "1013.3F:73.2"

    It is SUPPOSED to display "P:1013.3F:73.2"

    Why does the "P:" disappear?? I tried putting in " P:", and it still is not there!!

    Why does LCDout not like "P:"??

    Thanks!

    Tom

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Tom Gonser
    <br>
    LCDout $FE, "P:",#Dec_mb dig 4,#Dec_mb dig 3, #Dec_mb dig 2,#Dec_mb dig 1, ".",dec1 Dec_mb,"F:",#Dec_tempf dig 3, #Dec_tempf dig 2,#Dec_tempf dig 1, ".",dec1 Dec_Tempf

    Displays "1013.3F:73.2"

    It is SUPPOSED to display "P:1013.3F:73.2"
    Tom,

    The $FE at the biginning of the LCDOUT makes PBP think the next character is a Command. But instead it's the "P" that you want to display. If you remove the $FE it should work better.

    Darrel

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


    Did you find this post helpful? Yes | No

    Default

    That at least is an easy answer...

    You have LCDOUT $FE...

    either put a control character after the $FE (eg $FE,$C0 to position on the 2nd line), of lose the $FE.

    so either...

    LCDout $FE,$C0,"P:",#Dec_mb dig 4,#Dec_mb dig 3, #Dec_mb dig 2,#Dec_mb dig 1, ".",dec1 Dec_mb,"F:",#Dec_tempf dig 3, #Dec_tempf dig 2,#Dec_tempf dig 1, ".",dec1 Dec_Tempf

    or

    LCDout "P:",#Dec_mb dig 4,#Dec_mb dig 3, #Dec_mb dig 2,#Dec_mb dig 1, ".",dec1 Dec_mb,"F:",#Dec_tempf dig 3, #Dec_tempf dig 2,#Dec_tempf dig 1, ".",dec1 Dec_Tempf

    Bah! Beaten to an answer!

  4. #4
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Question

    THANKS!! That does help. I have another question tho on LCD positioning:

    If I just say

    LDCout $fe, 1
    LCDout $fe, 2
    LCDout " Hi There"

    It shows up as

    "re" on the first line of the display... I have to add a bunch of

    LCDout $fe, $10, $10, $10, $10, $10

    to get it to move over... Why is this think thinking the edge of the screen is so far OFF the screen to the left??

    Tom

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


    Did you find this post helpful? Yes | No

    Default

    what about if you use only
    LCDOUT $FE,1,"Hi there!!!"


    add a pause 2000 at the begining of your code?

    And now remove those DEFINE LCD_COMMANDUS and DEFINE LCD_DATAUS???
    Steve

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

  6. #6
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Smile

    Had the delay between commands at 500.. Switched to 2000 and it seems to have fixed it.. Where is it waiting for TWO SECONDS to do anything??

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


    Did you find this post helpful? Yes | No

    Default

    It appear that some LCD brand need big start-up delay. try decreasing it to PAUSE 1000.
    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, 08:56
  2. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 20:54
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 03:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 16:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 13:22

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