Thursday, 5 January 2012

MICRO CONTROLLERS..................


We had spent the past three days on various tasks and today also we expected some assignments. But unlike we expected, Sir came turned up to tell that we will be having a day with microcontrollers.
            
Earlier we had a session on microprocessors and microcontroller was a continuation of this topic.  We did some programs in 8085 processor kit in assembly level language..
             
To be very simple, the difference between a microprocessor and a microcontroller is that the latter is general purpose whereas the former is devoted for a specific purpose. The first functionally complete microcontroller is INTEL 8051.

                                    
                  
Second difference between a processor and a controller is that, in processor there are no dedicated ports to apply the input or output rather more there are no external pins. But in 8051 there are 4 i/o ports each port with 8 pins making a total of 32 pins for external connections. Each pin is associated with flipflops. Flipflops represent a storage unit and they holds one bit of data. In order to take an output from a pin, apply a, logic 1 in the data flipflpo(D flipflop). The output from D flpiflop is taken from the complementary pin and hence logic 0 reaches the transistor which turns off the transistor and the internal 5v reaches the pin. When we apply a input it is mandatory that the transistor must be turned off by applying a logic high at the D flipflop. Otherwise the input will conduct through the transistor.
             
  Next difference is treated to be the most interesting one. A processor is nothing but a simple processing unit. The other peripheral chips,RAM,ROM are external. But in the case of a controller the processor, RAM, ROM, peripheral chips are integrated in a single chip. The ROM has a boot loader and has a size of 4K whereas the RAM is used to store the data variables. It has a size of 128 bytes. If the internal RAM and ROM are insufficient then we can access the external memory.
         
Timer and counter….. Timer is used to produce a time delay from internal circuits whereas a counter is triggered by the external occurrences.
              
Interrupt is a widely used concept in controllers as well as in processors. When a interrupt signal is raised the control is transferred to the requested memory location based on the priority. There is another concept called polling where the processor pays attention to the first system and transfers the control to the next system only when the first system is completely serviced. An interrupt handler, also known as an interrupt service routine (ISR), is a callback subroutine in microcontroller firmware, operating system or device driver whose execution is triggered by the reception of an interrupt. Interrupt handlers have a multitude of functions, which vary based on the reason the interrupt was generated and the speed at which the interrupt handler completes its task. For transferring the control it is the content of the PC that is changed. Before transferring the control the state of the Pc will be stored in a stack. When a instruction IRET is encountered in the interrupt program then the content of the stack will be moved back to the PC.
      
  There are different types of communication like SERIAL, PARALLEL, SIMPLEX, HALF DUPLEX, DUPLEX, ASYNCHRONOUS, SYNCHRONOUS. SIr talked about a very important topic which th e bit rate and baud rate. In bit rate data transfer is expressed in terms of no: of bits per second and baud rate refers to the no: of changes per second.
                     
  Next up we familiarized Arduino Duemilianove. Arduino is an open-source single-board microcontroller, descendant of the open-source Wiring platform,[2][3] designed to make the process of using electronics in multidisciplinary projects more accessible. The hardware consists of a simple open hardware design for the Arduino board with an Atmel AVR processor and on-board input/output support. The software consists of a standard programming language compiler and the boot loader that runs on the board.[4]

Arduino hardware is programmed using a Wiring-based language (syntax and libraries), similar to C++ with some simplifications and modifications, and a Processing-based integrated development environment.[4]


              We did a program to light up an LED using a push button switch and then to light an LED using the LDR and to display some data in an LCD. Had an interesting session with microcontrollers…..

No comments:

Post a Comment