20x4 LCD and P18F2680


Results 1 to 10 of 10

Threaded View

  1. #1
    Join Date
    Aug 2005
    Posts
    20

    Question 20x4 LCD and P18F2680

    Hi!
    CODE:

    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 LCB_BITS 4
    DEFINE LCD_LINES 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 40

    @ __CONFIG _CONFIG1H, _OSC_HS_1H & _FCMENB_ON_1H & _IESOB_ON_1H
    @ __CONFIG _CONFIG2L, _BOR_OFF_2L & _PWRT_OFF_2L '& _BORV_42_2L
    @ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    @ __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H
    @ __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
    @ __CONFIG _CONFIG5L, _CP1_ON_5L & _CP0_ON_5L
    @ __CONFIG _CONFIG5H, _CPB_ON_5H & _CPD_ON_5H

    DEFINE OSC 20
    pause 4000
    loop:
    pause 1000
    lcdout $fe,1, "abcdefghilmnopqrstuv"
    lcdout $fe,$c0,"12345678912345678912"
    lcdout $fe,$94,"abcdefghilmnopqrstuv"
    lcdout $fe,$d4,"98765432198765432198"
    pause 2000
    goto loop

    END

    This is my little code...The problem is that I see only abcdefgh on the first line and 12345678 on the second line.
    The program works without problem with a pic16f916...
    How can I solve this problem?

    Thanks to all!
    Last edited by microuser; - 3rd June 2006 at 13:38.

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