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

New data type and PORT B change interrupt isr

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







New data type and PORT B change interrupt isr
PostPosted: Mon Jan 19, 2009 9:35 pm     Reply with quote

I have two doubt

1.) CCS will support for new data type ?
#typedef directive will it work?


2.) Is it possible to clear the RBIF bit inside the isr routine. because in simulator, i am not able to clear by software.

thanks
maaply
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 20, 2009 3:22 pm     Reply with quote

1. Is your question about #type or typedef ? They are two different
directives. The first one is special for CCS. The 2nd one is part of the
C language. If you have a question, post a test program that shows
the problem. (Post the code in this thread. Don't start a new thread
about it).


2. You can use the clear_interrupt(INT_RB) function. But CCS puts in
code at the end of the #int_rb isr to clear the RBIF interrupt flag. You
should not need to do it. If you have more questions, post your PIC
and your compiler version. Also post a test program that shows the
problem.
Ttelmah
Guest







PostPosted: Wed Jan 21, 2009 3:59 am     Reply with quote

RBIF, is set, when the PortB latch differs from the value on the pins. This is 'true', till you reset the PortB latch (by reading the port). You cannot clear the RB interrupt flag, till this is done.

Best Wishes
Guest








PostPosted: Fri Jan 23, 2009 3:23 am     Reply with quote

Ttelmah wrote:
RBIF, is set, when the PortB latch differs from the value on the pins. This is 'true', till you reset the PortB latch (by reading the port). You cannot clear the RB interrupt flag, till this is done.

Best Wishes



Thanks, But even i read the PORTB, I am not able to clear the RBIF bit. When control come out from isr, the bit cleared itself. Inside the RB_INT routine the RBIF is '1' always. I need to clear this flag inside the isr.
Or
Give any method, to find which pin got the interrupt signal.
Please help me.

Thanks
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Jan 23, 2009 8:50 am     Reply with quote

Anonymous wrote:
Thanks, But even i read the PORTB, I am not able to clear the RBIF bit. When control come out from isr, the bit cleared itself. Inside the RB_INT routine the RBIF is '1' always. I need to clear this flag inside the isr.
If the RBIF bit gets cleared I can't think of a reason why you would want to change the behaviour and clear the bit a few microseconds earlier.

Quote:
Or
Give any method, to find which pin got the interrupt signal.
See the CCS provided example file EX_PBUTT.C in your compiler's directory. This example only detects button press or release but that's what you often want. It can easily be modified to detect both actions.
Other examples can be found by using the 'Search' function of this forum and searching for 'int_rb'.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 23, 2009 2:08 pm     Reply with quote

Quote:
because in simulator, i am not able to clear by software.

What is your simulator ? I suggest trying another simulator.
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