You may think of it as a self-defined function you might create in C or Arduino as void function_name() except here the name is specific to the interrupt vector being applied.
The interrupt service routine, or ISR for short, is simply the routine which runs when the interrupt is triggered. Step 1: Create the interrupt service routine (ISR) I will assume prior knowledge of the RTTY (radio teletype) radio mode.
#ARDUINO RTTY TRANSMITTER SOFTWARE#
In this example, we will be focusing on using a software based timer interrupt using the popular ATMEGA328P, a chip used on many Arduino platforms. An interrupt can be triggered by a pin being pulled low, or perhaps each time an external oscillator ticks, or in many other ways that are described in the datasheet. There are many types of interrupt, and each type can be triggered in a certain way, details of which can be found in the interrupt vectors section of any AVR datasheet. This means that instead of waiting for an instruction to be executed before moving on to the next step, the main program can be doing something useful, and the interrupt will intervene when necessary to execute the instruction in question. Interrupts work by doing exactly what they say on the tin, they interrupt the running program to do something, before allowing the main program to continue on its way. This is usually perfectly suitable for most applications, but when power consumption is a chief concern, it is often wise to wonder, how can I get the most out of my microcontroller without increasing the power consumption? And with that, we enter a whole new world of microcontroller operation – interrupts. Interrupt driven RTTY on AVR – the proper way to use a microcontrollerĮver since I began developing software for embedded electronics for high altitude ballooning, I’ve been separating the execution of various instructions in the code using delays, where the running program simply waits for a few processing cycles before resuming normal operation.