Announcement

Collapse
No announcement yet.

Can't get LCD to work on Easypic 7 board using Pickit3 programmer

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get LCD to work on Easypic 7 board using Pickit3 programmer

    Can't seem to get this to work on Port B..


    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 0

    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 4

    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 5
    DEFINE LCD_LINES 2
    DEFINE LCD_BITS 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    ADCON0 = %00000000
    TRISB = %00000000
    worda var word
    worda = 12345

    Lop:
    pause 50
    LCDOUT $fe, 1,"DEC =", dec worda
    pause 1000
    LCDOUT $fe, 1,"Value = ",dec worda,".",dec1 worda
    pause 1000
    LCDOUT $fe, 1,"Value =", dec worda,".", dec2 worda
    pause 1000
    LCDOUT $fe, 1,"Value =", dec worda,".", dec3 worda
    pause 1000
    LCDOUT $fe, 1,"Value =", dec worda,".", dec4 worda
    pause 1000
    LCDOUT $fe, 1,"Value =", dec worda,".", dec5 worda
    pause 1000
    GOTO LOP

    END

    Can someone take a look and see what I am doing wrong? Thanks Don

  • #2
    Not sure which processor you are using but, sometimes the default config registers set port B to default to analog and not digital. I see NO configuration statements.
    Dave Purola,
    N8NTA
    EN82fn

    Comment


    • #3
      I am using pic 18f45k22...I can program the pic but the lcd doesn't display..trisb was set for the outputs..
      Not sure why this doesn't work. It compiles and works ok on 18f2550 not using the Easypic v7 board...

      Comment


      • #4
        I do not see where you are setting the ANSELx registers. They default to digital input buffer disabled. There are quite a few more registers added to the "K" series processors. Read the Spec sheet.
        Dave Purola,
        N8NTA
        EN82fn

        Comment


        • #5
          Thanks Dave, I think you are right....I have downloaded the pdf dataset and going over it...I was treating the 18f45k22 like I would a 18f4550 which is not correct..I will post back when I get this working..
          Thanks Dave....

          Comment

          Working...
          X