Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.

Similar presentations


Presentation on theme: "1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011."— Presentation transcript:

1 1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011

2 Outline Embedded system overview Microcomputer overview Microcontroller overview Developing an application and its requirement 2 © Unitec New Zealand

3 Embedded System An embedded system is simply a computer embedded in an engineering product. This computer undertakes the control of all the tasks within the engineering product. Examples 3 © Unitec New Zealand HomeOfficeAutomotive Washing machinePhotocopierDoor Mechanism MicrowavePrinterClimate control Toys, gamesScannerBrakes, Engine Control FridgeCar Entertainment

4 An Example 4 © Unitec New Zealand Designing embedded systems with PIC microcontrollers principles and applications / Tim Wilmshurst.

5 Elements of a computer 5 © Unitec New Zealand Central Processing Unit Input/Output Program Memory Data Memory

6 Instruction Sets CISC : - Complex Instruction Set Computer refers to computers designed with a full set of computer instructions that were intended to provide needed capabilities in the most efficient way. RISC: - Reduce Instruction Set Computer is that by reducing the full set to only the most frequently used instructions, the computer would get more work done in a shorter amount of time for most applications. CPU architecture is kept simple as compared to CISC. 6 © Unitec New Zealand

7 Memory Types Volatile: - The memory that only work as long as it is powered on. E.g., RAM. It is also called Data Memory Non-volatile : - The memory that retains its stored value, even when power is removed. E.g., ROM. Also called Program memory. 7 © Unitec New Zealand

8 Organizing Memory Von Neumann Architecture : - It has one data and one memory bus, and the same address and data buses serve both program and data memory. Harvard Structure : - Every memory area gets its own address and data bus. Pic is an example of Harvard structure. 8 © Unitec New Zealand

9 Von Neumann Architecture 9 © Unitec New Zealand Designing embedded systems with PIC microcontrollers principles and applications / Tim Wilmshurst.

10 Harvard Structure 10 © Unitec New Zealand Designing embedded systems with PIC microcontrollers principles and applications / Tim Wilmshurst.

11 Microprocessor??? Microcontroller??? 11 © Unitec New Zealand

12 Microcontroller families 12 © Unitec New Zealand Designing embedded systems with PIC microcontrollers principles and applications / Tim Wilmshurst.

13 Generic requirements for Micro’s Input/ output :- Microcontrollers emphasis is on their I/O resources, i.e., ability to handle interrupts, analog signals, number of I/O lines. Optimization of space: - Footprint is small and large pins means large footprint. Therefore one pin should perform different functions. 13 © Unitec New Zealand

14 Generic requirements Application specific microcontroller: - Vendors have developed families of devices with same instruction set but different hardware aspects, such as memory size, i/o, A/D, timers, interrupts, oscillators. Protection against failure: - Program should execute correctly and if a failure occurs then Micro controller should be capable enough to immediately correct it. Watch dog timer (WDT) is used for this purpose. 14 © Unitec New Zealand

15 Generic requirements Low Power consumption: - Microcontrollers are normally battery operated. Therefore low power consumption must be ensured for long operation. Protection of program against copies: - 15 © Unitec New Zealand

16 Block Diagram of Microcontroller 16 © Unitec New Zealand Timers Analog I/O Interrupt Control RAM Memory Parallel I/O ROM memory Watch Dog CPU Serial I/O Oscillator Address, Data and Control Bus

17 Components of microcontroller Oscillator to generate the signal necessary to synchronize all internal operations. CPU is the brain of the microcontroller. CPU fetches the program instructions from their locations in memory one by one, interprets or decode and finally execute them. It also contains the ALU. 17 © Unitec New Zealand

18 CPU Registers CPU has general and specific purpose registers. Specific purpose registers are Instruction Register (IR) Accumulator “working register for pic (W)” Status Register (STATUS) Program Counter (PC) Data Address Register (DAR) “File Select Register(FSR)” Stack Pointer (SP) 18 © Unitec New Zealand

19 Types of Memories RAM (Random Access Memory) ROM (Read Only Memory) Erasable Programmable Read Only Memory (EPROM) Electrical EPROM (EEPROM) OTP (one-time programmable) 19 © Unitec New Zealand

20 I/O resources I/O resources consists of serial and parallel ports, timers and interruption managers. Some microcontroller also contain analog input/ output lines associated with Analog to Digital (A/D) or D/A convertors. Watchdog are also considered apart of the I/O resources. 20 © Unitec New Zealand

21 Watch Dog Timer Watch Dog timer keep an eye on proper function of microcontroller. It get reset after a certain time. Therefore, programmer needs to continuously reset it for proper function of microcontroller. 21 © Unitec New Zealand

22 Watch Dog Timer 22 © Unitec New Zealand N- Pulse Counter Oscillator Clear from Program To Internal reset circuitry of microcontr oller

23 LOW Consumption Power consumption depends on three factors –Technology used –Frequency of Oscillator –Value of voltage supply. Idle and power down mode are two status which are used for conserving the power. 23 © Unitec New Zealand

24 Developing a program Select a Microcontroller model Write a Program Assemble or build or compile Simulate Blow it in Microcontroller 24 © Unitec New Zealand

25 Choosing your Microcontroller What is the application? Draw a circuit diagram or layout of your application. Then decide the input and output pin. What is the speed requirement? How many timers do you need? Do you need interrupt? 25 © Unitec New Zealand

26 Example To design a device to count the number of times a push button is pressed and display the value on a single seven segment display. When the value reaches nine it should resets. Suppose, we have PIC 16F54 and PIC 16F57 available with 12 and 20 I/O pins, respectively. 26 © Unitec New Zealand

27 Problem Design a system to test 16 push buttons and display the number of the button pressed (e.g., button number 11) on 16 output LEDs corresponding to specific input push button. –How many outputs pins required by 16 LEDS? –How many input pins required by 16 push buttons? –Which microcontroller is required? 27 © Unitec New Zealand

28 Flow chart A flow chart show the fundamental steps that microcontroller must perform, showing a clear program structure. 28 © Unitec New Zealand

29 Example of flow chart The flow chart for a simple program to simply keep a LED turned on. 29 © Unitec New Zealand Start of program: Setup Turn LED ON Loop back to beginning

30 Example of flow chart The flow chart for a program to turn an LED on, when a button is being pressed. 30 © Unitec New Zealand Start of program: Setup Turn LED ON Loop back to beginning Is button pressed Turn LED OFF

31 Problem Draw the flow chart to represent the program required to make an LED flash on and off every second (i.e., on for a second, then off for a second) and a buzzer to sound for one second every five seconds. 31 © Unitec New Zealand


Download ppt "1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011."

Similar presentations


Ads by Google