Tonights Question


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    18

    Default Tonights Question

    Hi there all you electro guru's,
    Thanks to all who helped me with my last little endeavour. Tonights question is: why does this code bring up a line of black boxes across the bottom row of my LCD. It is a 2 line LCD. The initial flash routine of the indicator LED works fine as to the slow pulses during the loop. I assume I've left plenty of time for initialisation. I am using a 16F84a. Contrast works fine. I'm at a loss (again )....Any suggestions welcome
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    You should write to the second line. I use code like this

    Code:
            LCDOut $FE, $01, "    El-Guard    "
            LCDOut $FE, $C0, "Master  Keyboard"
            pause 1000                      ' wait for a second
    This code displays two lines on the display

    Hope this helps
    Jerson

  3. #3
    Join Date
    Jul 2007
    Posts
    18


    Did you find this post helpful? Yes | No

    Unhappy No Joy

    Thanks for that Jerson, I replaced my output code with your patch and get the same result on my LCD (this is me scratching my head //) )

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I don't see any lcd defines


    '
    ' LCD setup
    ' =========
    DEFINE LCD_DREG PORTB ' LCD data port
    DEFINE LCD_DBIT 0 ' LCD data starting bit
    DEFINE LCD_RSREG PORTA ' LCD register select port
    DEFINE LCD_RSBIT 1 ' LCD register select bit
    DEFINE LCD_EREG PORTA ' LCD enable port
    DEFINE LCD_EBIT 2 ' LCD enable bit
    DEFINE LCD_BITS 4 ' LCD data bus size
    DEFINE LCD_LINES 2 ' Number lines on LCD
    DEFINE LCD_COMMANDUS 2000 ' Command delay time in us
    DEFINE LCD_DATAUS 50 ' Data delay time in us


    LCDOUT "HELLO WORLD"

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


    Did you find this post helpful? Yes | No

    Default

    From the PBP manual.
    PBP assumes the LCD is connected to specific pins unless told
    otherwise using DEFINEs. It assumes the LCD will be used with a 4-bit
    bus with data lines DB4 - DB7 connected to PICmicro MCU PORTA.0 -
    PORTA.3, Register Select to PORTA.4 and Enable to PORTB.3.
    It is also preset to initialize the LCD to a 2 line display.
    To change this setup, place one or more of the following DEFINEs, all in
    upper-case, at the top of your PicBasic Pro program:
    It looks like you are using the sample program in PBP. Make sure you have it wired just like the manual said and Jerson's code should work.

    If you are still having trouble with line two and line one is working, try using the DEFINES. There is a DEFINE for line two. Just add the DEFINEs to match the way you have it wired.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. ADCIN question
    By Greg McFadden in forum General
    Replies: 4
    Last Post: - 16th September 2008, 02:53
  2. FREQOUT - PWM question
    By Etcho in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 25th February 2007, 23:51
  3. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30
  4. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 09:45
  5. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49

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