16f88 can't get lcd to work


Results 1 to 13 of 13

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Give This A Try

    Hi John,
    Try this, I couldn't get the config fuses right for mpasm, but I was able to get them right for the default assembler. it should work keyword should.
    JS


    Code:
    @ DEVICE MCLR_OFF, XT_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF
    DEFINE OSC 4 ' XT osc
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 3
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 2
    DEFINE LCD_BITS 4
    ' Set number of lines on LCD
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    ' Set data delay time in us
    DEFINE LCD_DATAUS 100
    
    TRISB=%00000000                            ' all portb to output
    TRISA=%00000000                            ' all porta to output
    ADCON1 = 7 ' or ADCON1 = %00000111 'Disable A/D converter
    ANSEL=%00000000 ' set all analog pins to digital
    CMCON=7
    main
    pause 2000
    Lcdout $fe, 1, "Hello" ' Display Hello
    pause 1000 
    LCDOUT $FE,1,"John"
    goto main
    END
    Last edited by Archangel; - 12th December 2006 at 07:53.

Similar Threads

  1. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  2. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  3. Why doesn't my code for 18f452 work on 18f252?
    By senojlr in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd December 2005, 02:42
  4. Can't get LCD to work with 16F88
    By jswayze in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 10th September 2004, 11:05
  5. 4 line LCD with 16F88
    By anj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th February 2004, 09:06

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