Thursday, January 5, 2012

Microcontrollers

Yesterday we had Bejoy Sir's class on microcontrollers. It was this year's first class by Bejoy Sir. The entire morning session was spend on the theory part of microcontrollers.


First of all, we were told the difference between microprocessor and microcontroller. While microprocessor is for general purposes, microcontroller is used for a specific task. Microcontroller has a microprocessor as well as other parts to carry out the required task.


                  File:KL Intel P8051.jpg
The picture shown is of an Intel 8051 microcontroller. Source


Then, we discussed about polling and interrupt methods. In polling, the processor does one task and after finishing it goes to the next in a sequential manner. But in interrupt, the processor can be made to pause the execution of one task and do another task of higher priority by issuing an interrupt signal. When an interrupt occurs, the processor does the Interrupt Service Routine (ISR). Interrupts can be vectored or non-vectored. For vectored interrupts, the processor knows what is the location of the ISR that is to be executed. But for non-vectored interrupts, the ISR location has to be specified by the programmer. The processor comes back to the program that was being executed when the IRET instruction is encountered in the ISR.


Then, we discussed about serial and parallel communication. Simplex, half duplex and duplex were also mentioned. After the theory session, we did some practical work on the Arduino Duemilanove microcontroller.




                 File:Arduino Duemilanove 2009b.jpg




The picture shown is of an Arduino Duemilanove microcontroller. Source


The first program we got was to blink an LED which was really simple. Then, we did a program to operate an LED using a pushbutton switch. The program we did next was to blink an LED using a circuit involving an LDR. After that was done, we were shown an LCD display done using the Arduino microcontroller.

No comments:

Post a Comment