View previous topic :: View next topic |
Author |
Message |
halides
Joined: 28 Oct 2006 Posts: 4 Location: india
|
port C as interrupt |
Posted: Mon Mar 19, 2007 2:30 am |
|
|
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
|
|
Posted: Mon Mar 19, 2007 4:45 am |
|
|
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
|
i am using 18f series controller 4550 |
Posted: Mon Mar 19, 2007 5:04 am |
|
|
i am using 18f series controller 4550 _________________ Hi |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
|
Guest
|
|
Posted: Mon Mar 19, 2007 5:51 am |
|
|
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
|
|
Posted: Mon Mar 19, 2007 6:11 am |
|
|
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
|
|
Posted: Mon Mar 19, 2007 8:55 am |
|
|
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... |
|
|
|