Introduction to MSP430 Interrupts

In this tutorial, we will see an effective way on coding interrupts. Our task for today will be to learn interrupts for GPIO and Timers. In the initial part, we will first have a look on coding interrupts for the GPIO pins and in the later half we will modify this code to add interrupts for timers. By the end of the tutorial you will have a code that will blink a led using timer interrupt, however the blinking frequency will vary if you push a button. In the last tutorial on timers, we saw that we were continuously monitoring …

Basic understanding of microcontroller interrupts

Earlier I’ve made a mistake by referring this tutorial to older AVR family microcontrollers like Atmega8/16/32/64/128. But AVR is being changed constantly with various new tweaks and updates like enhanced pin control or different register names. Since now tutorial will be based on Atmega328 microcontroller which is popular in Arduino boards. So you’ll be able to test all code examples on Arduino as it can serve as general purpose AVR test board with no problem. Understanding Interrupts Probably you won’t be able to find a microcontroller without interrupt capability. These are essential attributes of any modern microcontroller or processor. They …

How to Interface a Microcontroller with a PS/2 Keyboard

In most of the case, it’s highly important when you’re moving from basic microcontroller programming to advanced microcontroller programming, especially if you wants to interrupt the code. Technically, interrupts are pieces of code that much likes functions. The interrupts are executed automatically when outside events occur. People always used the interrupts to react to all sorts of outside inputs; including pin changes that driven by outside devices. By using the interrupts, it enables the users to give the code an ability to react to events as they happen. In this case, we don’t have to wait for the code to …