View previous topic :: View next topic |
Author |
Message |
valemike Guest
|
Can't compile w/ "PORT_A.2" ?? |
Posted: Tue Mar 23, 2004 11:59 am |
|
|
Hi,
What are the compiler settings I need so that it can recognize the following:
#bit mike = PORT_A.2
For some reason, the compiler doesn't see the "PORT_A" naming convention. It works fine with something like PIN_A2 though.
Thanks,
Mike |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
|
Posted: Tue Mar 23, 2004 12:02 pm |
|
|
The port_A byte is located in a different place in the PIC16 and PIC18 series chips. You can #byte Port_A = 0x06 or something simular to get it working. Check the actual memory address for port A and use that value. |
|
|
valemike Guest
|
|
Posted: Tue Mar 23, 2004 12:10 pm |
|
|
Thanks Neutone
You see, i'm compiling someone else's code that was sent to us. He "supposedly" used the latest version of CCS.
My issue is not the physical location of "PORT_A", but rather, the compiler settings I have does not even recognize "PORT_A", "PORT_B", etc. Is that port naming an older convention used with previous CCS distributions?
At the moment I get errors that "PORT_A" is an unknown identifier.
I correctly pull up the most current PIC16F876.h file, i'm sure of that.
-Mike |
|
|
valemike Guest
|
|
Posted: Tue Mar 23, 2004 12:13 pm |
|
|
Basically, my question is: where is "PORT_A" defined in the .h files? Or is it even defined?
With my own code, i usually find myself explicitly declaring:
#byte port_a 0x06 |
|
|
valemike Guest
|
False Alarm... |
Posted: Tue Mar 23, 2004 12:46 pm |
|
|
I found that there is a big difference between:
#include "PIC18F876.h"
vs
#include <PIC18F876.H>
My problem was that I ignored the "PIC18F876.h" file attached, so i guess the compiler then looked for the one in its library, which does not contain the PORT_A defines. |
|
|
Ttelmah Guest
|
Re: False Alarm... |
Posted: Tue Mar 23, 2004 2:50 pm |
|
|
valemike wrote: | I found that there is a big difference between:
#include "PIC18F876.h"
vs
#include <PIC18F876.H>
My problem was that I ignored the "PIC18F876.h" file attached, so i guess the compiler then looked for the one in its library, which does not contain the PORT_A defines. |
This implies the author had modified the file, and put his version in the local directory. The "", versus <> format defines where the compiler is to look.
Best Wishes |
|
|
|