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

How to declare interrupt bits in CCS? (in general)

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



Joined: 08 Jan 2006
Posts: 26

View user's profile Send private message

How to declare interrupt bits in CCS? (in general)
PostPosted: Wed Jan 25, 2006 4:14 am     Reply with quote

How to declare interrupt bits in CCS? (in general)

like for the TMR2IF (timer 2 interrupt flag) it is:

#bit TMR2IF=0xF9E.1

what does that actually mean?

On the PIC18F452 datasheet, it says the timer 2 interrupt flag is at

PIR1 bit 1

how would i declare a bit for TMR2IE?

F9 converts to 249, but I don't see that anywhere for PIR1
[mAnNaRo]



Joined: 02 Dec 2005
Posts: 28
Location: Italy, Milan

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

PostPosted: Wed Jan 25, 2006 5:27 am     Reply with quote

Hi,

#bit TMR2IF=0xF9E.1

0xF9E then 0F9E (hex) is register address for PIR1 in memory.

0xF9E.1 is the bit 1 of register at address 0xF9E (PIR1)

so, for TMR2IE (bit 1 of PIE1 register, at address 0xF9D) the sintax is:

#bit TMR2IE=0xF9D.1

Bye
Alex
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