Kaare Mai

Simple interrupt sample

Discussion created by Kaare Mai on Jan 14, 2011
Latest reply on Jan 20, 2011 by Kaare Mai



I have been using the past two days just to get our new MCF51AC256 to run a simple piece of software. We use Codewarrior 10 (Eclipse based version).


Just to learn the MCU i created a simple C project wich configures the RTI to run every 1mS. Then inside the interrupt i toggle an LED output everytime a static counter reaches 500.


However, the interrupt is never called and i can't find any working source of information about how to setup a simple interrupt routine in the confusing documentation!


Also, i can't seem to grasp the difference between exceptions and interrupts as the 8-bit MCU's we've been working with until now never had anything called exceptions.


Last thing, if i use the keyword interrupt, _interrupt, _interrupt_ or _declspec(interrupt) eclipse marks it as syntax error.


So could someone please provide a simple, working example of how to use for example the RTI interrupt in a C project within CW 10?


Thanks in advance