Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Embedded > Re: interrupt c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 349 of 416
Post > Topic >>

Re: interrupt codes

by Daniel Friederich <danielfriederich_nospam@[EMAIL PROTECTED] > Aug 9, 2005 at 11:19 AM

Hi Aria,

the numbering used for the interrupt uses 0 for the reset vector 
(0xFFFE), 1 for 0xFFFC and so one.

I've added the vector numbers to the vector table from the 
mc68hc908qy4.h header file:

/**************** interrupt vector table ****************/
#define INT_ADC                 0x0000FFDE	/* 16 */
#define INT_KBI                 0x0000FFE0	/* 15 */
#define Reserved2               0x0000FFE2	/* 14 */
#define Reserved3               0x0000FFE4	/* 13 */
#define Reserved4               0x0000FFE6	/* 12 */
#define Reserved5               0x0000FFE8	/* 11 */
#define Reserved6               0x0000FFEA	/* 10 */
#define Reserved7               0x0000FFEC	/* 9  */
#define Reserved8               0x0000FFEE	/* 8  */
#define Reserved9               0x0000FFF0	/* 7  */
#define INT_TIMOvr              0x0000FFF2	/* 6  */
#define INT_TIMCH1              0x0000FFF4	/* 5  */
#define INT_TIMCH0              0x0000FFF6	/* 4  */
#define Reserved13              0x0000FFF8	/* 3  */
#define INT_IRQ                 0x0000FFFA	/* 2  */
#define INT_SWI                 0x0000FFFC	/* 1  */
#define INT_RESET               0x0000FFFE	/* 0  */

The function names do not matter, no magic names.
And 15 is right for the keyboard interrupt.

Daniel

PS: I'm not sure which 230 page manual you read, but consider that the 
vector numbers are derivative specific.
PPS: with the prm file VECTOR ADDRESS command, you can alternatively use 
the address instead of the vector number.

Aria wrote:
> Hi,
> 
> I'm very new to the motorolla chips (or programming MC for that
> matter). i am tryin got figure out how to write an interrupt service
> routine for the Keyboard interrupt.
>>From a not so reliable sample code i have:
> 
> interrupt 15 void KBI_ISR (void)
> 
> is this right? if so, can i replace KBI_ISR with some other name? and
> if i want to write an interrupt for IRQ, how do i know which interrupt
> number to use? how do i know which interrupt number to use for any of
> the interrupts?
> 
> I've read the 230 page manual and couldn't find it in there, is it
> there?
> 
> Thanks,
> Aria
>
 




 3 Posts in Topic:
interrupt codes
"Aria" <akas  2005-08-05 10:19:36 
Re: interrupt codes
"Aria" <akas  2005-08-05 10:24:47 
Re: interrupt codes
Daniel Friederich <dan  2005-08-09 11:19:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 14:39:49 CDT 2008.