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

Clearing IOC Interrupt Flag (16F1783)

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



Joined: 18 Jun 2015
Posts: 2

View user's profile Send private message

Clearing IOC Interrupt Flag (16F1783)
PostPosted: Thu Jun 18, 2015 5:53 pm     Reply with quote

I am using 3 I/O inputs (A0,1,2) as IOCs on 16F1783. I am new at CCS C, but some experience at assembler. According to the data sheet, the IOC interrupt flag bit should be reset with an AND instruction to prevent loss of additional events.

What is the defined name for the IOC flag register?

The hardware data sheet lists this register as IOCxF where x is A. Looking at the at the 16F1783.h file and there are several defined IOC: INT_IOC & INT_IOC_Ay where y is 0-7.

Rex Klopfenstein
Bowling Green, OH
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 18, 2015 6:14 pm     Reply with quote

You can put this line above main(). Then you can access IOCAF just
like a variable in your code:
Code:
#byte IOCAF = getenv("SFR:IOCAF") 


Or if you want more, this post tells how to generate a header file with
register definitions:
http://www.ccsinfo.com/forum/viewtopic.php?t=54022&start=1
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