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

Is PortB the only place for a hardware interrupt?

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



Joined: 14 Jun 2005
Posts: 64

View user's profile Send private message

Is PortB the only place for a hardware interrupt?
PostPosted: Sat Mar 11, 2006 4:43 pm     Reply with quote

Hi-
I'm using PICF877A and want to use 2 interrupts. Is Port B the only Port that supports hardware-based interrupts...as in if I push a switch, the software will interrupt.
My Port B is all used up. Crying or Very sad
Also- is there somewhere that has a list of all the PICF877A interrupts and describes them well. If you are going to direct me to the data sheet please tell me where exactly, I am lost in the 234 pages!
Thanks in advance!
SophE
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 5:26 pm     Reply with quote

Why not try page 153 (Section 14.11) interestingly enough it is titled "Interrupts"....
Sophi



Joined: 14 Jun 2005
Posts: 64

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 5:44 pm     Reply with quote

Thanks! Exactly what I needed.
*edit: and yes the title is very interesting Embarassed
S
Sophi



Joined: 14 Jun 2005
Posts: 64

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 8:15 pm     Reply with quote

After reading the interrupt section things are still not that clear. In the PIC877A.h file it has a list of interrupts that I can use. I am still looking for a more complete description of how they work so I can decide which ones to use.
Also it is not clear (at least not to me) whether or not PortB is the only port that supports an interrupt change on a pin.
Code:
#define GLOBAL                    0x0BC0
#define INT_RTCC                  0x0B20
#define INT_RB                    0x0B08
#define INT_EXT                   0x0B10
#define INT_AD                    0x8C40
#define INT_TBE                   0x8C10
#define INT_RDA                   0x8C20
#define INT_TIMER1                0x8C01
#define INT_TIMER2                0x8C02
#define INT_CCP1                  0x8C04
#define INT_CCP2                  0x8D01
#define INT_SSP                   0x8C08
#define INT_PSP                   0x8C80
#define INT_BUSCOL                0x8D08
#define INT_EEPROM                0x8D10
#define INT_TIMER0                0x0B20
#define INT_COMP                  0x8D40


Thanks for any help and your patience with me I have never used any interrupts-
SophE
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 11:09 pm     Reply with quote

If you need an additional "interrupt on change" interrupt, the most likely
one would be the Comparator interrupt. The comparator is on Port A.

Look in section 12.0 in data sheet for the Comparator module, and
specifically look in section 12.6 on Comparator interrupts.
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 11:38 pm     Reply with quote

You can use the capture/compare inputs as interrupts. That's pins 1 and 2 of port C. If all you want is an interrupt on a rising or falling edge (you do have to decide which) you can just respond to the interrupt and ignore the capture data.

But I'm always dubious about multiple interrupts. If you have lots of things generating them it's easy to get bogged down if everything happens at once. Would it be possible to use a repeating timer and poll the inputs you want to monitor?
Sophi



Joined: 14 Jun 2005
Posts: 64

View user's profile Send private message

PostPosted: Sun Mar 12, 2006 7:02 am     Reply with quote

Thanks JohnP and PCM!
SophE
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