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

RCIF undefined identifier

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



Joined: 16 Mar 2010
Posts: 11

View user's profile Send private message Send e-mail

RCIF undefined identifier
PostPosted: Wed Mar 17, 2010 1:21 am     Reply with quote

Hi

PIC16F690, CCS
As I was getting problem in reception of gsm data I thought of using RCIF for checking any reception.
But it is showing error, undefined identifier.
I know that it is bit of PIR1 reg.
So how can I define and use RCIF ?
_________________
Thanks & Regards
Lokesh Bhatt
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Wed Mar 17, 2010 2:55 am     Reply with quote

Multiple different answers:
First, this is what 'kbhit' does. When you setup #use RS232 for a hardware UART, if you call 'kbhit', it then returns the status of RCIF. So the 'CCS' way, would just be to test kbhit. The fact that such tests are available without tying the code directly to the hardware, is 'why' CCS doesn't normally include the accesses explicitly.

Second, would just be to define the bit, and access it. So:
Code:

#byte PIR1=0xC
#bit RCIF=PIR1.5

Then you can use RCIF as a single bit 'register' value, and test it.

Third, if you have the 'IDE', then this has the ability to generate a file of all the register defines for a chip. If you select 'device editor', pick your device, then at the top of the window, pick 'registers', and then 'make include file'. This will generate a file containing all the bit and byte register defines for the processor. RCIF, will be defined as 'MCU_RCIF', to ensure that you want to talk to the actual bit in the processor.

Fourth, similar include files are available on the forum (search....).

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