Top Banner
N. Senthil Kumar, M. Saravanan & S. Jeevananthan © Oxford University Press 2013
28
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 354 33 Powerpoint-slides CH22

N. Senthil Kumar,M. Saravanan & S. Jeevananthan

© Oxford University Press 2013

Page 2: 354 33 Powerpoint-slides CH22

MICROPROCESSOR SYSTEM DEVELOPMENTS AND RECENT TRENDS

© Oxford University Press 2013

Page 3: 354 33 Powerpoint-slides CH22

Introduction• Many number and types of microprocessors and microcontrollers are available in the

market. • The general purpose microprocessors have been developed and improved by manufacturers

and are largely used in personal computers. • With the advent of very large scale integration in IC fabrication and the tremendous

decrease in the cost of these devices, the microcontrollers have almost replaced the microprocessors in most of the applications.

• Embedded systems are electronic system having a microcontroller or other dedicated processor chips to do specific tasks.

• Embedded systems differ from generic PC systems that they are made for single application and can not be used or programmed for general applications.

• Embedded systems are supported by a wide array of processors and processor architectures.• Embedded systems are usually cost sensitive and real time constraint. • The micro-controllers are used in embedded systems such as computer printers, plotters, fax

machines, Xerox machines, telephones, automotive engine control mechanisms and in electronic instruments like oscilloscopes, multimeters, planimeters and IC testers etc.

© Oxford University Press 2013

Page 4: 354 33 Powerpoint-slides CH22

Introduction

• They are also found in the domestic appliances like washing machines, microwave oven, i-pods and other music systems.

• An advanced automobile has as many as 25 or more microcontrollers in different control applications.

• The market and the application of the microcontrollers are so high that about 80% of all CPUs sold in the world are microcontrollers and they go into an embedded system.

• A typical home in a developed country is likely to have around three dozen microcontrollers embedded in various appliances listed above.

• This chapter is dedicated to introduce the latest developments built into the microcontroller chips and to introduce the microcontroller development tools.

© Oxford University Press 2013

Page 5: 354 33 Powerpoint-slides CH22

Microcontroller Features and developments• Based on the architecture, two basic types of microcontrollers are

available in the market.• They are Reduced Instruction Set Computer (RISC) processors and

Complex Instruction Set Processor (CISC) processors. • A RISC processor has reduced instructions with very fast execution. • Almost, all the instructions of RISC processors are executed in a single

clock cycle. Limited numbers of addressing modes are used. • RISC processors are used when there is a need for very lengthy and

intensive computation such as speech processing.• CISC processors on the other side have many instructions and support

many addressing modes.• CISC are comparatively slower in execution of instructions. © Oxford University Press 2013

Page 6: 354 33 Powerpoint-slides CH22

Microcontroller Features and developments• Originally Microcontroller chips included Electrically Programmable

and Read Only Memory (EPROM). • The EPROM devices have the disadvantage of need of ultraviolet

light to erase the contents.• This disadvantage was rectified with the introduction of Electrically

Erasable and Programmable Read only Memory (EEPROM) devices and devices with flash memory

• Flash memory is a non-volatile electronic IC memory that can be electrically erased and reprogrammed many times. It is a specific type of EEPROM (Electrically Erasable Programmable Read-Only Memory).

© Oxford University Press 2013

Page 7: 354 33 Powerpoint-slides CH22

Microcontroller Features and developments• Since embedded processors are used to control devices, they need to accept input

from the device they are controlling.• The devices in general give analog signal. • This analog signal must be given as input in to the processor.• The processor can handle only digital data in binary form. • The analog to digital converter is used to convert the incoming data into a form

that the processor can recognize. • Most of the microcontrollers have analog to digital converters as an additional

feature in it.• Microcontrollers designed specially for motor control applications have a

dedicated Pulse Width Modulation (PWM) block. • This block generates a variable frequency and variable width pulses making it

suitable to control power converters, resistive loads, motors, etc., without using timers.

© Oxford University Press 2013

Page 8: 354 33 Powerpoint-slides CH22

Microprocessor Development systems• A Microprocessor Development Board is a circuit board containing a

microprocessor and the minimal support logic needed to become acquainted with the microprocessor on the board.

• The development board provides a system for learning to use a new microprocessor and the programming of the microprocessor.

• Many microprocessor training development kits are produced by microprocessor manufacturers and other third parties.

• The development boards have expansion connectors that connect to all the necessary CPU signals, so that an engineer could build and test an experimental interface or other electronic device.

© Oxford University Press 2013

Page 9: 354 33 Powerpoint-slides CH22

Microprocessor Development systems• The most important feature of the microprocessor development

board supplied by the manufacturers was Integrated Development Environment (IDE) software with a basic "debugger" and other related features.

• IDE is basically front-end software that provides integration of an editor, debugger, emulator and downloader along with features such as animation, and visualization features.

• Such features are listed in the following section.• Most of the IDE software in general has two modes, namely the

"Build Mode" and the "Run/Debug Mode". Build Mode supports source code creation and revision.

• All project, module, and edit functions are enabled.© Oxford University Press 2013

Page 10: 354 33 Powerpoint-slides CH22

System Development Environment for microcontrollers

• In-System Programming (abbreviated ISP) is the ability of microcontrollers to be programmed while installed in a complete system or development board.

• This feature avoids the chip to be programmed prior to installing it into the system or board.

• The primary advantage of this feature is that it allows the users to program the chips in their own way making it feasible to apply code or design changes at any time.

• Typically, chips supporting ISP have internal circuitry to support programming of the internal RAM using communication with the IDE via a serial protocol.

• Most programmable logic devices either the JTAG protocol or the USB port for ISP.

© Oxford University Press 2013

Page 11: 354 33 Powerpoint-slides CH22

System Development Environment for microcontrollers

• A debugger is the software supported by IDEs and is used to test run and debug the user written programs.

• The application code developed by the programmers can be examined by running or executing the code on an instruction set simulator (ISS).

• An emulator is another tool available in IDEs to duplicate the functions of one microcontroller system Emulation refers to the ability of a computer program or electronic device to imitate another program or device.

• An in-circuit emulator (ICE) is a hardware device used to debug the software of an embedded system. It is usually in the form of processor board which has many internal signals brought out for the purpose of debugging

© Oxford University Press 2013

Page 12: 354 33 Powerpoint-slides CH22

Cross Compiler for 8051• The programmer has to study and must have complete

knowledge of all the mnemonics and all their meanings. The mnemonics are difficult to remember.

• The assembly language programs developed for one microcontroller can not be used for another microcontroller. The project has to be started again from scratch.

• The assembly language programs are not easy to understand by a third person other than from programming team

© Oxford University Press 2013

Page 13: 354 33 Powerpoint-slides CH22

Microcontroller based System development

© Oxford University Press 2013

Page 14: 354 33 Powerpoint-slides CH22

Steps in Microcontroller programming

© Oxford University Press 2013

Page 15: 354 33 Powerpoint-slides CH22

Interface of 4 switches and 4 LEDs

© Oxford University Press 2013

Page 16: 354 33 Powerpoint-slides CH22

Program for Interface of 4 switches and 4 LEDs• #include <8051.h>• Void main (void )• {• unsigned int a;• P3=0xFF;• while (1)• { a= P3;• P1=a;• }• }

© Oxford University Press 2013

Page 17: 354 33 Powerpoint-slides CH22

Programming Example- 2

© Oxford University Press 2013

Page 18: 354 33 Powerpoint-slides CH22

Program to scroll the LEDs lighting for the interface diagram

© Oxford University Press 2013

Page 19: 354 33 Powerpoint-slides CH22

Interfacing of seven segment display with 8051

© Oxford University Press 2013

Page 20: 354 33 Powerpoint-slides CH22

Interfacing of seven segment display with 8051• The LSB of port 1 is connected to the ‘a’ segment and MSB is

connected to decimal point. • The program shown below uses a delay program with the delay

count. • The count used here is 33000. But this count value has to checked

and changed for different systems, clock frequency and different compilers.

• A dummy – ‘for loop’ is used for achieving the delay. The data for display is stored in the disp_data array.

• The disp count is incremented and the corresponding display data is taken from the array and the passed to the Port 1 pins. The counter is reset to 0 when the count exceeds 9.

© Oxford University Press 2013

Page 21: 354 33 Powerpoint-slides CH22

LED segments and display data for the interface diagram

© Oxford University Press 2013

Page 22: 354 33 Powerpoint-slides CH22

Program

© Oxford University Press 2013

Page 23: 354 33 Powerpoint-slides CH22

Energy Efficient Lighting Using Microcontroller

© Oxford University Press 2013

Page 24: 354 33 Powerpoint-slides CH22

Energy Efficient Lighting Using Microcontroller• The system uses many arrays of pairs of IR LEDs and phototransistor

throughout the house placed at the entrance of the rooms or at the corridors.

• The IR LEDs emit IR rays continuously. • The corresponding IR phototransistors are placed such that they receive the

IR rays after reflection. • Value of the resistance connected to the collector of the phototransistor

decides its sensitivity.• When the IR link between the IR LED and transistor breaks due to the

person passing or coming in front of the door, a low to high going transition takes place at the transistor collector and this is detected by the port 0 lines.

• The corresponding bulbs connected to port 1 are made ON and OFF.

© Oxford University Press 2013

Page 25: 354 33 Powerpoint-slides CH22

Energy Efficient Lighting Using Microcontroller

• The program given below assumes that on IR signal indicates a person entering or leaving a room.

• So, the relay switching is complemented at every signal from the IR sensor

• If the relay has turned on the light, then at the next IR sensor signal, the light is turned off.

• The system can be improved by introducing one more sensor at each entrance and detecting the direction of the person – entering the room or leaving the room.

• Accordingly, the program has to be changed.© Oxford University Press 2013

Page 26: 354 33 Powerpoint-slides CH22

C program

© Oxford University Press 2013

Page 27: 354 33 Powerpoint-slides CH22

C program

© Oxford University Press 2013

Page 28: 354 33 Powerpoint-slides CH22

Summary

• The recent developments in the microcontroller hardware include lot of additional features like flash memory, more timers, watchdog timers and data converters.

• The IDE – Integrated Development Environment is software including an editor, compiler, debugger and downloader or programmer. This IDE is supplied by chip manufacturers or available from third party vendors.

• The embedded C programming or any high level language programming of microcontrollers has become very common with the availability of many cross compilers and IDE tools

© Oxford University Press 2013