View previous topic :: View next topic |
Author |
Message |
starfire151
Joined: 01 Apr 2007 Posts: 195
|
lcd.c changes from 3.x to 4.x... |
Posted: Sat Mar 21, 2009 9:50 am |
|
|
I have just upgraded from 3.249 to 4.088. I wanted to go back through some of my old programs to recompile them with the new compiler version to verify everything still works OK (maintaining old code).
While the majority of programs were recompiled successfully, I am having problems with any of my programs which used the lcd.c functions. I get compiler errors. I remember this was a problem when upgrading versions of 3.x, also, and I had to uncomment the line to route the lcd port pins to execute through Port B as opposed to the default Port D, since I was using a PIC18LF2620 part. There seems to be a new version of the lcd.c code now, though, and it doesn't seem to work.
Has anyone else run across this condition? If so, have you determined a solution?
Thanks.
Dave |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Mar 21, 2009 10:37 am |
|
|
Temporarily re-install your old version of the compiler. Copy the lcd.c
file from the \Drivers directory to your project directory. (Rename it
if you wish). Then change the #include line in your main C source file
for lcd.c to use quotes instead of angle brackets. This will pull the it
from your project directory instead of from \Drivers. Add a comment
as a reminder as to why you did this.
Then re-install the new compiler. |
|
![](templates/subSilver/images/spacer.gif) |
starfire151
Joined: 01 Apr 2007 Posts: 195
|
|
Posted: Sat Mar 21, 2009 5:05 pm |
|
|
Thanks very much for that. It works like a charm!
In looking at the new lcd.c file, it appears to have a lot more flexibility in that the I/O pins used for the LCD function don't need to be grouped on one Port if using pin access. This looks like it will probably the best way for coding new programs using the LCD functionality.
I noticed I had several warning messages which didn't show up in the 3.x version, also. Most were associated with return values from ISRs, I2C functions, etc. Is there a summary somewhere describing the general coding changes from 3.x needed for "correct" compilation under 4.x.
Thanks, again.
Dave |
|
![](templates/subSilver/images/spacer.gif) |
|