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

port C as interrupt

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



Joined: 28 Oct 2006
Posts: 4
Location: india

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

port C as interrupt
PostPosted: Mon Mar 19, 2007 2:30 am     Reply with quote

Hi Friends,

m trying to replace my ISRs (ext interrupts) from portC interrupts.
I just came to know that PORT C PIN4,5,6,7 can be used as change detection pins, but i dont have any idea how to do this.

I want to detect the pulses at these pins and each pulses are some events occuring continuously.

any help in this matter will be highly appreciated.

~halide~
_________________
Hi
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Mar 19, 2007 4:45 am     Reply with quote

Could you pls tell us wich PIC are you using ? In all the 16F series with these capabilities,
this feature is in PORT B.

Humberto
halides



Joined: 28 Oct 2006
Posts: 4
Location: india

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

i am using 18f series controller 4550
PostPosted: Mon Mar 19, 2007 5:04 am     Reply with quote

i am using 18f series controller 4550
_________________
Hi
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Mar 19, 2007 5:16 am     Reply with quote

May be you misunderstood something.
Download the PIC18F4550 from Microchip website and read Chapter 9 Interrupts (P.99)
http://ww1.microchip.com/downloads/en/DeviceDoc/39632D.pdf

Then read how to implement an interrupt on change:
http://www.ccsinfo.com/faq.php?page=int_ext_button

Then post what do you want to do.


Humberto
Guest








PostPosted: Mon Mar 19, 2007 5:51 am     Reply with quote

i go thro your direction, but that i know very well.
pin 0, 1 and two of port B are used as ext interrupts.

#INT_RC //Port C any change on C4-C7

tell me the meaning of this line....... it could be possible that i misunderstood it.

what i want is,,,

can i use portC pin 4,5,6,7 as external interrupt pin......?
KaraMuraT



Joined: 16 May 2006
Posts: 65
Location: Ankara/Turkey

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

PostPosted: Mon Mar 19, 2007 6:11 am     Reply with quote

No you can not...

18F4550 Datasheet Page 99:

Quote:

For external interrupt events, such as the INT pins or the PORTB input change interrupt, the interrupt latency will be three to four instruction cycles. The exact latency is the same for one or two-cycle instructions. Individual interrupt flag bits are set regardless of the status of their corresponding enable bit or the GIE bit.


You can see all the sources as a graph on page 100.
_________________
/// KMT
/// www.muratursavas.com
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Mon Mar 19, 2007 8:55 am     Reply with quote

You can have interrupts on PORTC using tricks, for ex: CCP1 and CCP2 could be used as external interrupt, Rx too ... etc ...

But you have to be careful...
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