Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Microcontroller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Microcontroller
[attachment=31375]
1. Introduction to microcontroller
A microcontroller is a programmable integrated circuit which can be programmed to do a number of tasks. It is possible to control just about anything with the program written by the user. Some functions of a microcontroller are-
 Ability to execute a stored set of instructions to carry out user defined task.
 Ability to access external memory chips to read & write data from/to memory.
 Ability to interface with the I/O devices.
Some Microcontrollers have some extra features like-
 ADCs and DACs
 UART for serial communication
 Internal EEPROM
 PWM modules for analogue output
2. Difference between microprocessor, microcontroller and microcomputer
It is common to hear these terms being used interchangeably. However, each is quite distinct from the other and it is important to understand the differences.
A microprocessor is a central processing unit (CPU) on a single chip. CPU-arithmetic logic unit (ALU), instruction decoder, registers, bus control circuit, etc.
When a microprocessor and associated support circuitry, peripheral I/O components and memory (program as well as data) were put together to form a small computer specifically for data acquisition and control applications, it was called a microcomputer.
In a logical extension, when the components that make a microcomputer were put together on a single chip of silicon, it was called the microcontroller.
3. Components of microcontroller:
1. CPU: The central processing unit (CPU) is the heart of the controller. It fetches the instructions stored in the program memory, decodes these instructions, and executes them. The CPU itself is composed of registers, the arithmetic logic unit (ALU), instruction decoder, and control circuitry.
2. Program Memory: The program memory stores the instructions that form the program. To accommodate larger programs, the program memory may be partitioned as internal program memory and external program memory in some controllers. Program memory is usually non volatile and is of EEPROM or EPROM or Flash or Mask ROM or OTP (one-time programmable) type.
3. RAM: The RAM is the data memory of the controller, i.e., it is used by the controller to store data. The CPU uses RAM to store variables as well as the stack. The stack is used by the CPU to store return addresses from where to resume execution after it has completed a subroutine or an interrupt call.
4. Clock Oscillator: The controller executes the program out of the program memory at a certain rate. This rate is determined by the frequency of the clock oscillator. The clock oscillator could be an internal RC-oscillator or an oscillator with an external timing element, such as a quartz crystal, an LC resonant circuit, or even an RC circuit. As soon as the power is applied to the controller, the oscillator starts operating.
5. Reset and Brownout Detector Circuit: The reset circuit in the controller ensures that at start up all the components and control circuits in the controller start at a predefined initial state and all the required registers are initialized properly. The brownout detector is a circuit that monitors the power supply voltage, and if there is a momentary drop in voltage, resets the processor so that the drop in voltage does not corrupt register and memory contents, which could lead to faulty operation of the controller.
6. Serial Port: The serial port is a very useful component on the controller. It is used to communicate with external devices on a serial data basis. The serial port can operate at any required data transfer speed. The serial port takes data bytes from the controller and shifts out the data one bit at a time to the output. Similarly, it accepts external data a bit at a time, makes a byte out of 8 such bits, and presents this to the controller. Serial ports are of two types: synchronous and asynchronous. Synchronous data transfer needs an accompanying clock signal with each data bit for timing information, while the asynchronous data transfer does not need the clock signal, and the timing information and synchronization is embedded in the data bit itself by way of duration of data bits as well as additional start- and stop-bits on the data path.
7. Digital I/O Port: The microcontroller uses the digital I/O components to exchange digital data with the outside world. Compared to the serial port, which transfers data serially, one bit at a time, the data on the digital I/O port is exchanged as bytes.
8. Analog I/O Port: Analog input is performed using an analog-to-digital converter (ADC). The controller could be equipped with an integrated ADC or an analog comparator, which is used under software control to perform A-to-D conversion. ADCs are used to acquire sensor data from devices such as temperature sensors and pressure sensors; such sensors often produce proportional analog voltage data. Analog output is performed using a digital-to-analog converter (DAC). Most controllers are equipped with pulse-width modulators that can be used to get analog voltage with a suitable external RC filter. DACs are used to drive motors, for visual displays (of the older VU meter types), to generate sound or music, etc.
9. Timer: The timer is used by the controller to time events; e.g., it may be required to output data to a display at some rate. The timer would be used by the controller to generate that rate.
The timer can also be used to count events, external as well as internal. In that case the timer is called a counter.
10. Watchdog Timer: A watchdog timer (WDT) is a special timer with a specific function. It is usually used to prevent software crashes. It works as follows: Once armed, the WDT increments an internal counter at some rate. If the user program does not reset the counter, the counter overflows, which is used to reset the controller. The user software is programmed suitably, therefore, frequently enough, to reset the WDT to give a sort of “I am alive” indication. The assumption is that if the user program does not reset the WDT, it has failed in some way and therefore rather than a system crash or unpredictable system performance, it is better to reset the system.
11. RTC: A real timer clock (RTC) is a special timer with the task of maintaining time of day, date, etc. It can be used to time-stamp events.