Anda di halaman 1dari 24

Microprocessor and Microcontroller Fundamentals

ELEC 330 Digital Systems Engineering Dr. Ron Hayne


Images Courtesy of Ramesh Gaonkar and Delmar Learning

Admin
Course materials available online http://ece.citadel.edu/hayne/

Students are encouraged to print lecture slides in advance and use them to take notes in class

330_01

Microcontrollers
Embedded Systems

Operations managed behind the scenes by a microcontroller An integrated electronic computing device that includes three major components on a single chip
Microprocessor (MPU) Memory I/O (Input/Output) ports

Microcontroller (MCU)

330_01

Microcontrollers
Support Devices

Timers A/D converter Serial I/O

All components connected by common communication lines called the system bus.

330_01

Block Diagram

330_01

Microprocessor (MPU)
A group of electronic circuits fabricated on a semiconductor chip that can read binary instructions written in memory and process binary data according to those instructions CPU and MPU

330_01

Memory
A semiconductor storage device consisting of registers that store binary bits Two major categories

Read/Write Memory (R/W) Read-only-Memory (ROM)

D7

D0
330_01 7

Input/Output (I/O)
Input devices such as switches and keyboards provide binary information to the microprocessor Output devices such as LEDs, video screens, and printers receive information from the microprocessor

330_01

Microprocessor-Based Systems

330_01

Microprocessor Architecture
The MPU communicates with memory and I/O using the system bus consisting of:

Address bus: unidirectional and carries memory and I/O addresses Data bus: bidirectional; transfers binary data and instructions between MPU and memory and I/O Control lines: Read and Write timing signals asserted by MPU

330_01

10

Microprocessor-Based System with Buses: Address, Data, and Control

330_01

11

Example Microprocessor System

330_01

12

Software: From Machine to High-Level Languages


Machine Language: binary instructions

Difficult to decipher and write Prone to cause many errors in writing All programs converted into the machine language of a processor for execution
Description Add reg B to Acc Add Acc A and B Processor Intel 8085 80 ADD B ABA

Instruction Hex Mnemonic 10000000

00101000
00011011

28
1B

ADD A, R0 Add Reg R0 to Acc

Intel 8051
Motorola 6811

330_01

13

Software: From Machine to High-Level Languages


Assembly Language: machine instructions represented in mnemonics

Has one-to-one correspondence with machine instructions Efficient in execution and use of memory; machine-specific and not easy to troubleshoot

330_01

14

Software: From Machine to High-Level Languages


High-Level Languages (such as BASIC, C, and C++)

Written in statements of spoken languages (such as English)


machine independent easy to write and troubleshoot requires large memory and less efficient in execution

330_01

15

Data Format (8-bit)


Unsigned Integers: All eight bits (Bit7 to Bit0) represent the magnitude of a number

Range 00 to FF in Hex and 0 to 255 in decimal

330_01

16

Data Format (8-bit)


Signed Integers: Seven bits (Bit6 to Bit0) represent the magnitude of a number.

The eighth bit (Bit7) represents the sign of a number. The number is positive when Bit7 is zero and negative when Bit7 is one. Positive numbers: 00 to 7F (0 to 127) Negative numbers: 80 to FF (-1 to -128) All negative numbers are represented in 2s complement

330_01

17

Data Format (8-bit)


Binary Coded Decimal Numbers (BCD)

8 bits of a number divided into groups of four, and each group represents a decimal digit from 0 to 9 Four-bit combinations from A through F in Hex are invalid in BCD numbers

Example: 0010 0101 represents the binary coding of the decimal number 25 which is different in value from 25H.

330_01

18

Data Format (8-bit)


American Standard Code for Information Interchange (ASCII)

Seven-bit alphanumeric code with 128 combinations (00 to 7F) Represents English alphabet, decimal digits from 0 to 9, symbols, and commands

330_01

19

MPU-Based Systems
System hardware

Includes discrete components such as a microprocessor, memory, and I/O Components connected by buses

address, data, and control

System software

A group of programs that monitors the functions of the entire system

330_01

20

MPU-Based Time and Temperature System

330_01

21

MCU-Based Systems
Includes microprocessor, memory, I/O ports, and support devices (such as timers) on a single semiconductor chip Buses are generally not available to a system designer I/O ports are generally multiplexed and can be programmed to perform different functions
330_01 22

MCU-Based Time and Temperature System

330_01

23

Computer Architectures
Princeton versus Harvard Architecture CISC versus RISC processors Microprocessors and Microcontrollers

330_01

24

Anda mungkin juga menyukai