• AVR Freaks

Hot!lcd interface doesnt work on another laptop

Author
aviator3679
New Member
  • Total Posts : 27
  • Reward points : 0
  • Joined: 2019/08/22 13:32:23
  • Location: 0
  • Status: offline
2019/08/25 15:22:31 (permalink)
0

lcd interface doesnt work on another laptop

Hello,
I am trying to interface an lcd display LM016L to my pic18f2620. I am using mplab x ide v5.25 and the compiler is xc8 v1.34.
This is working perfectly on my one laptop, but on the other it doesnt.It says...unable to resolve identifier...I dont know what to do....the code i used is :
 
#include <stdio.h>
#include <stdlib.h>
#include "lcd.h"
void init_XLCD (void);
void DelayFor18TCY (void);
void DelayPORXLCD (void);
void DelayXLCD (void);
void main (void)
{
init_XLCD();
putrsXLCD("StudentCompanion");
SetDDRamAddr (0x40);
putrsXLCD("LCD DISPLAY");
while (1) {

}
}
void init_XLCD (void){
OpenXLCD(FOUR_BIT & LINES_5X7);
while(BusyXLCD());
WriteCmdXLCD(0x06);
WriteCmdXLCD (0x00);
}
void DelayFor18TCY (void){
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop(); Nop(); Nop();
Nop(); Nop();
return;
}
void DelayPORXLCD (void){
Delay1KTCYx(30);
}
void DelayXLCD (void){
Delay1KTCYx(10);
}
#1

10 Replies Related Threads

    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 3233
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 16:10:17 (permalink)
    0
    Maybe the two source codes are not identical or different compiler versions exist.
     
    Or:
     
    The library *.a file is not installed in projects for this include? 
    #include "lcd.h"
     
     
     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #2
    aviator3679
    New Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2019/08/22 13:32:23
    • Location: 0
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 16:24:52 (permalink)
    0
    Gort2015,
     
    the source codes are identical, ive checked them at least 3 times.
    what do you mean...*.a file ?
    #3
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 16:39:09 (permalink)
    0
    LCD code does not come with XC8, it's something you downloaded separately.
    Are you sure you have it on the second laptop?
    i.e. both lcd.h and lcd.c
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 3233
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 16:47:49 (permalink)
    0
    It seems they are not identical.
     
    Copy the source that compiles ok to the other.
     
     
    Ignore, "*.a"

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #5
    katela
    Super Member
    • Total Posts : 1385
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 17:09:58 (permalink)
    0
    Do you have more than two XC8 versions installed in your computer? If yes, are you sure you have selected xc8 v1.34?

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #6
    aviator3679
    New Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2019/08/22 13:32:23
    • Location: 0
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 17:20:49 (permalink)
    0
    to ric:
    i know,yeah i have both lcd.h and lcd.c on the second laptop
     
    to Gort2015:
    i did,no use
     
    to katela:
    yeah i have xc8 v1.34 and xc8 v2.05, but yeah for this specific project ive selected xc8 v1.34
    #7
    1and0
    Access is Denied
    • Total Posts : 9631
    • Reward points : 0
    • Joined: 2007/05/06 12:03:20
    • Location: Harry's Gray Matter
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 17:29:29 (permalink)
    5 (1)
    aviator3679
    I am trying to interface an lcd display LM016L to my pic18f2620. I am using mplab x ide v5.25 and the compiler is xc8 v1.34.
    This is working perfectly on my one laptop, but on the other it doesnt.It says...unable to resolve identifier.

    Isn't that an MPLAB X issue?  If XC8 compiles okay, ignore it! ;)


    Also, try adding
    #include <xc.h>

    and config bits.
     
    post edited by 1and0 - 2019/08/25 17:35:22
    #8
    katela
    Super Member
    • Total Posts : 1385
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 17:35:09 (permalink)
    4 (1)
    What you are experiencing is a bit strange, if you are using XC8 v1.34 the Xlcd is part of the peripheral library so you shouldn't have a problem with the library. can you post your full error log? Maybe it's complaining about something else.
    Does your code compile or is it just a warning?
    Is it possible to post the screenshot of your project settings? Just to be sure....
     
    In your project properties, --> XC8 Linker, --> check that Link in peripheral library is selected. 
    post edited by katela - 2019/08/25 17:55:58

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
    #9
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 18:21:09 (permalink)
    0
    katela
    What you are experiencing is a bit strange, if you are using XC8 v1.34 the Xlcd is part of the peripheral library so you shouldn't have a problem with the library.
    ...

    The header for XLCD is xlcd.h
    The OP is using "lcd.h", so apparently something else.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #10
    aviator3679
    New Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2019/08/22 13:32:23
    • Location: 0
    • Status: offline
    Re: lcd interface doesnt work on another laptop 2019/08/25 21:42:02 (permalink)
    0
    Thank you all guys for your time and answers, katela actually  solved this,the problem was that for some reason when i was building the project the Link in peripheral library was unchecked and thats why it couldnt compile. The strange part is that in the previous project this exact box was checked,i am not sure how it changed....anyway,since it works who cares...
     
    Thank all and especially katela!!!!!!!!!
     
     
     
    #11
    Jump to:
    © 2019 APG vNext Commercial Version 4.5