LCDOUT custom commands - how to?


Closed Thread
Results 1 to 40 of 69

Hybrid View

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


    Did you find this post helpful? Yes | No

    Lightbulb

    Hey Steve.

    I could be wrong, but I think it needs a fix.

    The LCD will Power-up in 8-bit mode, but PBP will still be sending 4-bit.
    So each nibble acts as a full command.
    If you use $33 (twice), then it will get the "reset" 4 times, instead of $30,$00,$30,$00 ...

    Then when it switches to 4-bit mode, it receives an extra nibble from the $20 which puts it out of sync with the rest of the data. By pulsing the E pin once it clocks in another $0 which is a "nothing" command and puts it back in sync.

    Like this ...
    Code:
    ManualLCDInit:
        FLAGS=2  ' Void PBP lcd initialisation... it's a nice feature !!!
        PAUSE 500
        Lcdout $FE, $33
        Lcdout $FE, $33
        Lcdout $FE, $20 ' official 4 bit mode
        @  bsf LCD_EREG, LCD_EBIT
        PAUSEUS 20
        @  bcf LCD_EREG, LCD_EBIT
    
     ; -- rest is the same --
    DT

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Turn off comparators too

    Hi flotulopex,
    Ms Melanie mentioned to make sure all analog stuff is off, I saw no mention of the comparators. That silly 16F88 uses them. One of the harder early 16f series to set up because it uses ansel, adcon and cmcon registers and people seem to miss one or the other.
    CMCON=7
    JS

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


    Did you find this post helpful? Yes | No

    Default

    Darrel, i think you're right. My previous work on a regular 44780 controller type so far but will send
    3,0,3,0,3,0, and lastly 2,0... so 3 not really needed 0's...

    I did something else, but i don't think it will be handy now.

    NOW...
    Code:
        @  bsf LCD_EREG, LCD_EBIT
        PAUSEUS 20
        @  bcf LCD_EREG, LCD_EBIT
    yup, or
    Code:
        @  bsf LCD_EREG, LCD_EBIT
        @  PAUSEUS?C LCD_DATAUS
        @  bcf LCD_EREG, LCD_EBIT
    Joe S. The analog comparator are disable at POR on this one. But it's always nice to include the line too as safety sake.
    Last edited by mister_e; - 27th November 2006 at 07:00.
    Steve

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

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    It's so cruel: when I think all has been done, you All come with more suggestions and I'm in my office now and will have to wait until this evening to try all this out ;-)

    Okay Joe, I'll try this one. You're right, some settings on this PIC can be tricky if we forget them.

    Darrel, you're far ahead of what I'm able to understand. It sounds so clear for you. What shall I do, replace Mister_e's $30 by your $33?

    Merci Steve, it will be easy to copy/paste and check quickly.

    Come back to you later.

    Thank you All.
    Roger

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default LCDOUT xx, xx explanations needed PLEASE

    Until I can try all what you suggest, I would like to understand how you Guys read and interpret the codes in the Initialisation Table I put in my post #19. It looks so obvious to you, unfortunately it is not to me...

    As an example, I would like to know how you come to a LCDOUT $FE, $0C to switch On the display.

    In the table the line sais Display ON/OFF, you see the bits RS(I don't even know what this one is for) and R/W, and then you have for each DB7...0 a value (0 or 1). Finally you've got this $0F value which appears to me as coming from nowhere.

    I admit that the $FE is a standart value for sending datas to the display.

    But, in this example, where comes the $0C from? I'm lost...

    I'm missing this very basic stuff and bothering you with stupid questions so was this discussed in antoher thread already?
    Roger

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Das Book

    Quote Originally Posted by flotulopex

    But, in this example, where comes the $0C from? I'm lost...
    Hi flotulopex,
    No question you do not know the answer to is stupid.
    $0C - listed in PBASIC PRO MANUAL page 94. $0C = Cursor Off
    JS

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default but "how to" on my own?

    Hello Joe S.,

    I read this document (PBP manual) almost any time I have a question but I sometimes don't understand the explanations.

    As you mention, the actual $0C value listed in the manual switches the Cursor OFF; Mister_e sais that, according to the table, it switches the Display ON. There is a difference.

    Mister_e must have interpreted the table; this is what I would like to be able to do too.

    So, my question was more precisely to:
    a) understand the definition table (in post #19);
    b) learn how to use the informations on there.

    I don't know how to express myself more clearly but if my question looks confusing, please tell me.
    Roger

  8. #8
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    As you mention, the actual $0C value listed in the manual switches the Cursor OFF; Mister_e sais that, according to the table, it switches the Display ON. There is a difference.

    Mister_e must have interpreted the table; this is what I would like to be able to do too.

    So, my question was more precisely to:
    a) understand the definition table (in post #19);
    b) learn how to use the informations on there.
    Look at the datasheet for the LCD controller, specifically Page 26.

    "Display On/OFF"

    The 8 bits for the register = 00001DCB

    D= display 1=on 0=off
    C=cursor 1=on 0=off
    B=blink cursor 1=on 0=off

    so "00001100"

    Will give Display On Cursor and Blink off which is $0C

    $0C is the command to turn the Cursor OFF but it also turns the dsipay on as well

    $0E will turn the display on with a cursor
    Keith

    www.diyha.co.uk
    www.kat5.tv

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