Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Micro Controllers & Embedded System Design Introduction & Background Department of Electrical & Computer Engineering Missouri University.

Similar presentations


Presentation on theme: "Introduction to Micro Controllers & Embedded System Design Introduction & Background Department of Electrical & Computer Engineering Missouri University."— Presentation transcript:

1 Introduction to Micro Controllers & Embedded System Design Introduction & Background
Department of Electrical & Computer Engineering Missouri University of Science & Technology A.R. Hurson

2 Instructor: Ali R. Hurson 128 EECH hurson@mst.edu
Office Hours T, R 14:00-15:00 Text: The 8051 Microcontroller and Embedded Systems Using Assembly and C, Second Ed., Class notes available at: introduction-to-micro-emebedded-design.html A.R. Hurson

3 Grading Policy In class exams: 40% Final Exam (Comprehensive): 35%
Home works and Projects: 20% Active class participation 5% Individual grade will be determined based on individual effort, individual effort relative to the class effort, and proactive class participation. A.R. Hurson

4 Hardcopy of homeworks and Projects are collected at the beginning of the class,
You are working as a group (three people per group) on homeworks/projects (grouping is fixed through out the semester), November 30 is the deadline for filing grade corrections; no requests for grade change/update will be entertained after this deadline A.R. Hurson

5 Introduction to Micro Controllers & Embedded System Design
Note, this unit will be covered in two lectures. In case you pre-test it, then you have the following options: 1) Take the early test and start module2 2) Study the supplement module (supplement.module1) 3) Act as a helper to help other students in studying module1 Note, options 2 and 3 have extra credits as noted in course outline.

6   Introduction to Micro Controllers & Embedded System Design
Enforcement of background Glossary of prerequisite topics No Familiar with the topics? Review background for this module Yes Take Test At the end: take exam, record the score, impose remedial action if not successful No Pass? Remedial action Yes Glossary of topics Current Module No Familiar with the topics? Take the Module Yes Take Test No Pass? Yes Options Lead a group of students in this module (extra credits)? Study next module? Study more advanced related topics (extra credits)? Extra Curricular activities

7 Apple, IBM, HP, Sun, Dell, SGI
System Class Main Frames Minicomputer Desktops Smart products Era 1950s on 1970s on 1980s on 2000s on Form Factor Multi-cabinets Multiple boards Single board Single chip Resource Type Corporate Departmental Personal Embedded Users/CPU 100s-1000s 10s-100s 1 100s/user Cost $1 million $100,000+ $1,000-$10,000 $10-$100 # worldwide 10,000+ 100,000s+ 108 1011 Major Players IBM, CDC, GE, Boroughs, NCR Honeywell, Univac Dec, IBM, HP, Pyramid, Wang Apple, IBM, HP, Sun, Dell, SGI ? OS By manufacturer Some Unix DOS, MacOS, Windows A.R. Hurson

8 What is its objective (s)?
Why this course? What is its objective (s)? This course attempts to study a computer in general and specifically microprocessor and microcontroller architectures. So one has to find out what a computer is. A.R. Hurson

9 A computer, like any other system, is a collection of interconnected entities (components) in order to perform a well defined function. This function is determined by the functions performed by its components and by the manner in which they are interconnected. The function of the computer is a mapping of the input data to the output data: F: A  B In case of a digital system A and B are digital or discrete quantities. A.R. Hurson

10 The study of computers is the study of its components, their interactions, and their parallel activities and co- operations. In this course a computer is viewed as a collection of five interconnected components: Input Unit Output Unit Memory Unit Central Processing Unit (CPU): Control Unit (CU) Arithmetic Logic Unit (ALU) A.R. Hurson

11 Central Processor Unit: is used to:
Input Unit: is an interface between the outside world and the internal parts. It performs two tasks: Transmission and Translation of information. Output Unit: is an interface between the internal parts and the outside world. Its functions are the same as the Input Unit. Memory Unit: acts as storage. It stores the instructions, data, intermediate, and final results. Central Processor Unit: is used to: Interpret the instructions and initiate their executions. Perform arithmetic and logical operations on the data. A.R. Hurson

12 CPU CU ALU Memory Unit Information Input Unit Output Unit Result
Data Path Control Path A.R. Hurson

13 In general, a computer can be studied at four different levels: Electronic, Logic, Programming, and System. Though it is hard to generalize, usually: Electronic level is the subject of physics and mathematics, Logic level is the subject of electrical engineering, and Programming and System levels are the subjects of computer science/computer engineering. A.R. Hurson

14 Level Components Electronic Active: transistor, voltage sources
Passive: resistor, capacitor Logic combinational sequential register gates, AND, OR, ... Flip Flops, ... register, data, operators, ... Programming compiler interpreter machine oriented assembly machine micro System control, processor, ... Program Instruction Subroutine Module A.R. Hurson

15 Conversion from Decimal to base R
A decimal number can be converted to another base, say R, by repeated division and recording the remainder, until the quotient becomes zero. A.R. Hurson

16 Conversion from Decimal to base R
Example: Convert 72 in base 10 to a hexadecimal number (i.e., base 16) Hence (72)10 = (48)16 Q R Remarks 72/16 = 4 8 Least significant digit 4/16 = Most significant digit A.R. Hurson

17 Conversion from Decimal to base R
Example: Convert 56 in base 10 to a binary number Hence (56)10 = (111000)2 Q R Remarks 56/2 = 28 Least significant digit 28/2 = 14 14/2 = 7 7/2 = 3 1 3/2 = ½ = Most significant digit A.R. Hurson

18 Conversion from base R to Decimal
This will be done by summing the products of each digit with its positional weight. Positional weight is the power of base starting from 0. (121)10 = Positional weight Hence 121 = 1 * * * 100 A.R. Hurson

19 Conversion from base 16 to Decimal
Example: Convert 56 in base 16 to a decimal number (56)16 = 5 * * 160 = = (86)10 A.R. Hurson

20 Conversion from base 2 to Decimal
Example: Convert (110110)2 to a decimal number (110110)2 = 1 * * * * * * 20 = = (54)10 A.R. Hurson

21 Conversion from base R to base Q
Convert the number from base R to base 10 Convert the decimal number to base Q A.R. Hurson

22 Conversion from base R to base Q
Example: Convert (57)8 to base 12 (57)8 = 5 * * 80 = = (47)10 Hence: (57)8 = (3B)12 Q R Remarks 47/12 = 3 11 (B) Least significant digit 3/12 = Most significant digit A.R. Hurson

23 Conversion from base 16 to binary
Convert each hexadecimal digit into a 4 binary digits. Example: Convert (ABC)16 to binary A = 1010 B = 1011 C = 1100 Hence: (ABC)16 = ( )2 A.R. Hurson

24 Conversion from binary to base 16
Start from right to left, make groups of 4 binary digits, Convert each group into a hexadecimal digit Example: Convert ( )2 to hexadecimal number Hence: ( )2 = (199)16 A.R. Hurson

25 Question: conversion from binary to octal and vice versa?
A.R. Hurson

26 Conversion of decimal fraction to base R
This can be done by iterative multiplication of fraction by base R and recording the integer parts of the results. A.R. Hurson

27 Conversion of decimal fraction to base R
Example: Convert (.56)10 to hexadecimal Hence (.56)10 = (.8F)16 Integer part Remarks .56* 16 = 8.96 8 1st fraction digit .96 * 16 = 15.36 15 (F) 2nd fraction digit A.R. Hurson

28 Conversion of decimal fraction to base R
Example: Convert (.56)10 to binary Hence (.56)10 = ( )2 Integer part Remarks .56* 2 = 1.12 1 1st fraction digit .12 * 2 = 0.24 2nd fraction digit .24 * 2 = .48 3rd fraction digit .48 * 2 = .96 4th fraction digit .96 * 2 = 1.92 5th fraction digit .92 * 2 = 1.84 6th fraction digit .84 * 2 = 1.64 7th fraction digit A.R. Hurson

29 Conversion of fraction in base R to decimal fraction
This can be done by summation of multiplication of each digit by its positional weight in base R. A.R. Hurson

30 Conversion of fraction in base R to decimal fraction
Example: Convert ( )2 to a decimal number ( )2 = 1 * 1/2 + 1 * 1/4 + 1 * 1/8 + 0 * 1/ * 1/ * 1/64 = 1/2 + 1/4+ 1/8 + 1/32 + 1/64 = … = (.875)10 A.R. Hurson

31 Basic Arithmetic Operations are:
Addition Subtraction Multiplication Division A.R. Hurson

32 Basic Logic Operations are:
AND OR NOT A.R. Hurson

33 Questions What is the minimum number of arithmetic operations needed to carry out all arithmetic operations? What is the minimum number of logic operations needed to carry out all logic operations? A.R. Hurson

34 Addition of two binary bits is as follows:
a + b Sum Carry 0 + 0 1 0 + 1 1 + 0 1 +1 A.R. Hurson

35 Addition of three binary bits is as follows:
c Sum Carry 1 A.R. Hurson

36 Addition of two binary numbers can be done by using the previous two tables.
Example: perform (11001)2 + (101101)2 Carry 1 + Sum 25 + 22 47 A.R. Hurson

37 Subtraction can be done by means of complement operation:
A – B = A + (complement of B) A.R. Hurson

38 A 1 + Sum Carry out A.R. Hurson

39 A 1 + Sum A.R. Hurson

40 As noted before, in general subtraction can be done using 2s or 1s complement addition.
Example: 1 - 1 + Result A.R. Hurson

41 Addition of hexadecimal numbers
Example: perform the following operation Carries 1 A B C D + 3 4 5 Result F 2 A.R. Hurson

42 Subtraction of hexadecimal numbers
Similarly subtraction can be done using 16s and 15s complement addition. Example: perform the following operation A B C D - 3 4 5 Carries 1 A B C D + F Result 8 A.R. Hurson

43 Basic Logic AND gate A B A  B 1 A  B A.R. Hurson

44 Basic Logic OR gate A B A  B 1 A  B A.R. Hurson

45 Basic Logic NOT gate A 1 A A.R. Hurson

46 Basic Logic NAND gate  A B A  B 1 A  B  A.R. Hurson

47 Basic Logic NOR gate  A B A  B 1 A  B  A.R. Hurson

48 Basic Logic EXOR gate A B A  B 1 A  B A.R. Hurson

49 Basic Logic EXNOR gate  A B A  B 1 A  B  A.R. Hurson

50 Note: The NAND and NOR are called universal functions since with either one we can generate AND, OR, and NOT gates A.R. Hurson

51 Basic Logic A.R. Hurson

52 Half adder Is a logic circuit with two inputs and two outputs generating Sum and Carry A B Sum Carry 1 A.R. Hurson

53 Full adder Is a logic circuit with three inputs and two outputs generating Sum and Carry (a cascade of two half adders) a b cin Sum Carry 1 Sum A.R. Hurson

54 Questions: Decoder Encoder Flip-flops A.R. Hurson

55 Summary Computer: A device capable of solving problems (data manipulation) by accepting data, performing prescribed operations on the data, and supplying the results. Microprocessor: a computer that is contained in a single integrated circuit (all peripherals are off the CPU chip). Microcontroller: A microprocessor with a number of integrated peripherals, typically used in control-oriented applications (everything is on one chip). Central processing unit: The component of a computer system with the capability to control the interpretation and execution of the instructions. The CPU includes the arithmetic-logic unit and the control unit. A.R. Hurson

56 Summery Primary Memory: Also called Main memory. It is a volatile/nonvolatile memory that holds the program and intermediate data during the course of a program execution. Secondary Memory: A nonvolatile memory that is used to hold the program and data between the runs. A.R. Hurson

57 Summery Assembly Language: A symbolic representation of machine language. Assembler: A compiler that translates assembly language to machine language. Translation: To change information from one form of representation to another without changing the meaning.  operation: A basic operation that is executed during a clock cycle. A.R. Hurson

58 Summery Transmission: The act of sending information from one location and the receiving of the same information in another location. Logic Transfer Level: A method in which a computer is studied based on its functionality. Register Transfer Language: A tool which allows to represent, study, and analyze a computer at the Logic Transfer Level. A.R. Hurson

59 Questions Why are we interested in computer?
what is the distinction between program and data? What is a machine dependent language? What is the difference between machine dependent and machine independent languages? What is the difference between assembly instruction and machine instruction? What is the difference between the assembly instruction and the micro instruction? A.R. Hurson

60 Questions Define the term “Little Endian”.
Define the term “Big Endian”. Define the term “Instruction Format”. A.R. Hurson


Download ppt "Introduction to Micro Controllers & Embedded System Design Introduction & Background Department of Electrical & Computer Engineering Missouri University."

Similar presentations


Ads by Google