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
>


|