Interrupts

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
Pete
Posts: 4
Joined: Fri Feb 01, 2008 9:40 pm
Location: Hull, UK
Contact:

Interrupts

Post by Pete »

Hi, can anybody tell me how to set up the interrupt on change feature for the AT91SAM7S128?

I have done polling of portb using the periodical timer interrupt, but just want to test for a button press without using this method.

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Interrupts

Post by Benj »

Hello Pete

As long as the chip has this feature available then it should be possible to create the interrupt via a custom interrupt. Search the forum for custom interrupts and you should find all the info you need. Most of the info will be for the PICmicro devices but the data should transfer over to the AVR. Refer to the AVR device datasheet for correct register names.

Pete
Posts: 4
Joined: Fri Feb 01, 2008 9:40 pm
Location: Hull, UK
Contact:

Re: Interrupts

Post by Pete »

Thanks Benj,

It was for Arm7 btw not AVR. I have managed to sort it out now, I had to enable the peripheral Clock. I think it is good how you can associate interrupts with any port IO with these devices. So flexible.

Thanks Anyway.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Interrupts

Post by Benj »

Sorry Pete

Think I must have been in Flowcode mode. Glad you've got it all working now. Yes the ARM devices are certainly very flexible and powerful. Were all looking forward to the Flowcode for ARM release here at Matrix.

Post Reply