lcd interfacing with pic18f452


Closed Thread
Results 1 to 2 of 2
  1. #1
    einton's Avatar
    einton Guest

    Default lcd interfacing with pic18f452

    Hi to every one
    guys i m interfacing lcd to the pic18f452 and im sending u the following code , i have tested it on hardware circuit i m using 10 mhz crystal and it is not working also i have try to simulate it on proteas and it is not simulating at all i dont know what is the problem and i m perfectly burnt since i m working on it last few days so kindly help me
    im posting it

    LIST p=18F452 , F=INHX32, MM=OFF, N=0, ST=OFF , R=HEX
    #Include <P18F452.INC>
    CONFIG OSC=HS , OSCS=OFF
    CONFIG WDT=OFF
    CONFIG BORV=45, PWRT=ON, BOR=ON
    CONFIG DEBUG=OFF, LVP=OFF, STVR=OFF
    ORG 00h
    LCD_DATA EQU PORTB
    LCD_CTRL EQU PORTD
    R2 EQU 0*2
    R3 EQU 0*3
    RS EQU RD0
    RW EQU RD1
    EN EQU RD2
    CLRF TRISD
    CLRF TRISB
    BCF LCD_CTRL,EN
    CALL LDELAY
    MOVLW 0*38
    CALL COMNWRT
    CALL LDELAY
    MOVLW 0*0E
    CALL COMNWRT
    CALL LDELAY
    MOVLW 0*01
    CALL COMNWRT
    CALL LDELAY
    MOVLW 0*06
    CALL COMNWRT
    CALL LDELAY
    MOVLW 0*84
    CALL COMNWRT
    CALL LDELAY
    MOVLW A'P'
    CALL DATAWRT
    CALL LDELAY
    MOVLW A'A'
    CALL DATAWRT
    CALL LDELAY
    MOVLW A'K'
    CALL DATAWRT
    AGAOP BTG LCD_CTRL,0
    BRA AGAOP
    COMNWRT
    MOVWF LCD_DATA
    BCF LCD_CTRL,RS
    BCF LCD_CTRL,RW
    BSF LCD_CTRL,EN
    CALL LDELAY
    BCF LCD_CTRL,EN
    RETURN
    DATAWRT
    MOVWF LCD_DATA
    BSF LCD_CTRL,RS
    BCF LCD_CTRL,RW
    BSF LCD_CTRL,EN
    CALL LDELAY
    BCF LCD_CTRL,EN
    RETURN
    ORG 500H
    LDELAY
    MOVLW D'40'
    MOVWF R2
    AJAIN MOVLW D'250'
    MOVWF R3
    HERE NOP
    NOP
    DECF R3,F
    BNZ HERE
    DECF R2,F
    BNZ AJAIN
    RETURN
    END

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello Einton,

    Perhaps you didn't notice that this forum is specific to Pic Basic compilers. The are just a few people here that understand assembly language. We
    also don't do Proteas here. Pic Basic compilers don't work with simulators.
    I believe Onshon has a form of Pic Basic that has a simulator but it is a variable that doesn't work with the compilers we use here.

    You might try www.microchip.com. They have forums that help with assembly and C languages.

    Sorry we can't be of more help.

    BobK

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. Pic18f452 with 20x4 LCD Help
    By djmachine in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th November 2008, 22:43
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. cant get my Lcd to work using Pic18f452
    By civicgundam in forum General
    Replies: 13
    Last Post: - 7th October 2007, 00:13
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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