PIC18F442-LCD problems


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Location
    Slovenia EU
    Posts
    32

    Default PIC18F442-LCD problems

    I made circuit with PIC16F876 and used following definitions:


    DEFINE osc 4

    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 2
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    LCD is working proper.

    After this I changed MCU, instead of PIC16F876 I put PIC18F442 and changed DEFINE osc 20 and made configuration HS mode on oscillator.

    In program it was also used INT0 PIN on port B.

    LCD does not display anything, all other subprograms are working correct. Do I have to change any register on port B? Does somebody know what is the problem or why this problem occur?

    Thank you for your help.

    Kind regards.

    Samo

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    A possibility : If you changed the power supply also, meaning that if you are using this new PIC in another circuit, then the contrast level of LCD has also changed; thus you get either too dim or too dark on LCD.

    Adjust the contrast pot.



    ----------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Samoele
    I made circuit with PIC16F876 and used following definitions:


    DEFINE osc 4

    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 2
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    LCD is working proper.

    After this I changed MCU, instead of PIC16F876 I put PIC18F442 and changed DEFINE osc 20 and made configuration HS mode on oscillator.

    In program it was also used INT0 PIN on port B.

    LCD does not display anything, all other subprograms are working correct. Do I have to change any register on port B? Does somebody know what is the problem or why this problem occur?

    Thank you for your help.

    Kind regards.

    Samo
    In program it was also used INT0 PIN on port B.
    If I understand correctly you have port B set as inputs, they must be set as outputs for the LCD to work. TRISB = %00000000 or if you need to use the leftover bits as inputs then TRISB = %00000011
    JS

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


    Did you find this post helpful? Yes | No

    Default

    is LVP fuse is set to OFF too?

    Before programming your PIC, make sure your device programmer program those fuses settings.
    Steve

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

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. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. problems with parallel LCD
    By Brown in forum mel PIC BASIC
    Replies: 11
    Last Post: - 12th June 2008, 04:37
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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