tAhm1D
Senior Member
Offline
Posts: 326
Thank You
-Given: 103
-Receive: 180
|
|
« on: March 28, 2009, 04:21:14 16:21 » |
|
Hi, I have used MPLAB v6.40, v7.30 and now v7.52. While programming in assembly language, I faced a problem with all the versions of MPLAB. Even after I include the header file like include "p18f4520.inc" I still have to declare the special function registers as MPLAB cannot detect the SFRs mentioned in the included header file. What is the problem?
|
|
|
Logged
|
|
|
|
oldvan
Senior Member
Offline
Posts: 372
Thank You
-Given: 154
-Receive: 107
If the van is a Rockin'...
|
|
« Reply #1 on: March 28, 2009, 07:29:26 19:29 » |
|
Have you tried MPLAB 8.2? Versions 6 and 7 are pretty badly antiquated. You could be struggling with an old and now fixed problem.
If you want, post a sample of what you are trying and I'll try it here, let you know result.
|
|
|
Logged
|
Give a man a fish and you feed him for a day. Teach a man to fish and he will sit around in a boat drinking beer all day.
|
|
|
tAhm1D
Senior Member
Offline
Posts: 326
Thank You
-Given: 103
-Receive: 180
|
|
« Reply #2 on: April 01, 2009, 07:39:52 19:39 » |
|
Have you tried MPLAB 8.2? Versions 6 and 7 are pretty badly antiquated. You could be struggling with an old and now fixed problem.
If you want, post a sample of what you are trying and I'll try it here, let you know result.
Hi oldvan, I have downloaded MPLAB 8.3 and started using it. Even in this version, same problem persists. I think, there may be an inherent problem in MPLAB in this regard. However, if you can find any solution, please let me know.
|
|
|
Logged
|
|
|
|
oldvan
Senior Member
Offline
Posts: 372
Thank You
-Given: 154
-Receive: 107
If the van is a Rockin'...
|
|
« Reply #3 on: April 01, 2009, 10:29:54 22:29 » |
|
Please post a sample of what you are doing, I've just been working on an assembly language program for the 16F877 using MPLAB 8.2 with no problems. I suspect you are making a small error that once corrected can make your life MUCH easier.
|
|
|
Logged
|
Give a man a fish and you feed him for a day. Teach a man to fish and he will sit around in a boat drinking beer all day.
|
|
|
Parmin
Hero Member
Offline
Posts: 582
Thank You
-Given: 496
-Receive: 133
Very Wise (and grouchy) Old Man
|
|
« Reply #4 on: April 01, 2009, 11:04:35 23:04 » |
|
Do you specify the path directory for the .inc file?
|
|
|
Logged
|
If I have said something that offends you, please let me know, so I can say it again later.
|
|
|
oldvan
Senior Member
Offline
Posts: 372
Thank You
-Given: 154
-Receive: 107
If the van is a Rockin'...
|
|
« Reply #5 on: April 02, 2009, 12:45:27 00:45 » |
|
Should be no need to call out the entire path, MPASM should know where they live. The following worked fine in my program: #INCLUDE <P16F877.INC> ; THIS IS WHERE CHIP REGISTERS AND BITS ARE DEFINED
|
|
|
Logged
|
Give a man a fish and you feed him for a day. Teach a man to fish and he will sit around in a boat drinking beer all day.
|
|
|
xzb
Newbie
Offline
Posts: 27
Thank You
-Given: 16
-Receive: 5
|
|
« Reply #6 on: April 02, 2009, 02:25:42 02:25 » |
|
I used v8.2 Whatever one or ones( #INCLUDE <P18F4520.INC> #INCLUDE "P18F4520.INC" )no problem.
|
|
|
Logged
|
|
|
|
tAhm1D
Senior Member
Offline
Posts: 326
Thank You
-Given: 103
-Receive: 180
|
|
« Reply #7 on: April 02, 2009, 01:29:18 13:29 » |
|
Should be no need to call out the entire path, MPASM should know where they live. The following worked fine in my program: #INCLUDE <P16F877.INC> ; THIS IS WHERE CHIP REGISTERS AND BITS ARE DEFINED
Hi oldvan, In my case it is not working. Let me put a small Test program. In the following Test program with Pic18f4520,where 2 leds in portb are lit, include path is not working and only when portb and trisb is defined in the program (remove the semicolon), only then the program is build successfully. Why? Please assemble the program and let me know kindly.
|
|
« Last Edit: April 02, 2009, 01:34:47 13:34 by tAhm1D »
|
Logged
|
|
|
|
oldvan
Senior Member
Offline
Posts: 372
Thank You
-Given: 154
-Receive: 107
If the van is a Rockin'...
|
|
« Reply #8 on: April 02, 2009, 03:45:27 15:45 » |
|
Case seems to be causing the problem in this case. For MPASM, Is not the same as: Try it and report back. :-)
|
|
|
Logged
|
Give a man a fish and you feed him for a day. Teach a man to fish and he will sit around in a boat drinking beer all day.
|
|
|
tAhm1D
Senior Member
Offline
Posts: 326
Thank You
-Given: 103
-Receive: 180
|
|
« Reply #9 on: April 02, 2009, 04:44:31 16:44 » |
|
Hi oldvan, Now it works. Yes, the problem was because of the case. So simple but so problematic.
|
|
« Last Edit: April 02, 2009, 04:52:36 16:52 by tAhm1D »
|
Logged
|
|
|
|
|