CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Can't compile w/ "PORT_A.2" ??

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
valemike
Guest







Can't compile w/ "PORT_A.2" ??
PostPosted: Tue Mar 23, 2004 11:59 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 23, 2004 12:02 pm     Reply with quote

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







PostPosted: Tue Mar 23, 2004 12:10 pm     Reply with quote

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







PostPosted: Tue Mar 23, 2004 12:13 pm     Reply with quote

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...
PostPosted: Tue Mar 23, 2004 12:46 pm     Reply with quote

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...
PostPosted: Tue Mar 23, 2004 2:50 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group