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

INT_EXT2 on PIC18F458

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



Joined: 04 Aug 2004
Posts: 7

View user's profile Send private message

INT_EXT2 on PIC18F458
PostPosted: Fri Aug 06, 2004 5:38 am     Reply with quote

hi!

i'm using the pic18f458 and wanted to use the int2-pin (rb2) for external interrupt. but there is no interrupt constant INT_EXT2 defined in the 18f458.h (only INT_EXT and INT_EXT1).
so how can i use the external interrupt 2 in my code?

thanks!

cya
i2c2k
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Aug 06, 2004 5:41 am     Reply with quote

You can always use the PIC's registers to set things up. Refer to the section in the datasheet for which registers to set.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Aug 06, 2004 5:43 am     Reply with quote

Checking my header file, I found this:
Code:

////////////////////////////////////////////////////////////////// INT
// Interrupt Functions: ENABLE_INTERRUPTS(), DISABLE_INTERRUPTS(),
//                      EXT_INT_EDGE()
//
// Constants used in EXT_INT_EDGE() are:
#define L_TO_H              0x40
#define H_TO_L                 0
// Constants used in ENABLE/DISABLE_INTERRUPTS() are:
#define GLOBAL                    0xF2C0
#define INT_RTCC                  0xF220
#define INT_TIMER0                0xF220
#define INT_TIMER1                0x9D01
#define INT_TIMER2                0x9D02
#define INT_TIMER3                0xA002
#define INT_EXT                   0xF210
#define INT_EXT1                  0xF008
#define INT_EXT2                  0xF010
#define INT_RB                    0xF208
#define INT_PSP                   0x9D80
#define INT_AD                    0x9D40
#define INT_RDA                   0x9D20
#define INT_TBE                   0x9D10
#define INT_SSP                   0x9D08
#define INT_CCP1                  0x9D04
#define INT_CCP2                  0xA001
#define INT_BUSCOL                0xA008
#define INT_LOWVOLT               0xA004
#define INT_CANIRX                0xA380
#define INT_CANWAKE               0xA340
#define INT_CANERR                0xA320
#define INT_COMP                  0xA040
#define INT_EEPROM                0xA010
#define INT_TBE0                  0xA304
#define INT_TBE1                  0xA308
#define INT_TBE2                  0xA310
#define INT_RDA0                  0xA301
#define INT_RDA1                  0xA302
#define INT_CANTX2                0xA310
#define INT_CANTX1                0xA308
#define INT_CANTX0                0xA304
#define INT_CANRX1                0xA302
#define INT_CANRX0                0xA301


Maybe yours is old.
mnv



Joined: 04 Aug 2004
Posts: 7

View user's profile Send private message

PostPosted: Fri Aug 06, 2004 5:51 am     Reply with quote

hm... why has it been missing?
thank you!
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