22
Microcontroller Overview Sally Abdelghany _ [email protected] Week 1 14-4-2012

Microcontroller overview 1

Embed Size (px)

Citation preview

Page 1: Microcontroller overview 1

Microcontroller Overview

Sally Abdelghany _ [email protected] Week 114-4-2012

Page 2: Microcontroller overview 1

A Brief History of Microprocessors

• In 1971 Intel 4004 at “Intel corporation“. It was the first single-chip microprocessor was the 4-bit

• In 1972 Intel 8008 at “Intel corporation“. It was an 8-bit CPU with an external 14-bit address bus that could address 16KB of memory.

• In (1971-1974) TMS 1000 at “Smithsonian Institution” with “Texas Instruments “ developed TMS1802NC on September 17, 1971. TMS1802NC was 4-bit, combined read-only memory, read/write memory, processor and clock on one chip and was targeted at embedded systems

• In 1977 Intel 8048 at “Intel corporation“. based on TMS 1000 It combined RAM and ROM on the same chip.

• In 1993 PIC16x84 at “Microchip Technology” the introduction of EEPROM memory allowed microcontrollers At The same year at “Atmel” introduced the first microcontroller using Flash memory

Page 3: Microcontroller overview 1

Microcontroller Vs Microprocessor

• What is the microprocessor? The microprocessor is the integration of a number of useful functions into a

single IC package. These functions are:

• The ability to execute a stored set of instructions to carry out user defined tasks.• The ability to be able to access external memory chips to both read and writedata from and to the memory. (Link)

• What is the microcontroller? Is Advice that Include Microprocessor,

Memory and input/output Devices on a single chip (Computer on Chip)

Page 4: Microcontroller overview 1

Microcontroller

• Microcontroller consist ofMicroprocessor +1- Memory2- A/D & D/A ( ‘A’ analog, ‘D’ digital)3- I/O port 4- Timers/ Counter5- Communication Protocols

Page 5: Microcontroller overview 1

• RAM (Random Access Memory)- Volatile Type Memory - Two Type

Memory

RAM ROM Flash Register

1- Memory

•(Flip-Flop)•Expensive, Faster than DRAM, less power

SRAM (static)

•(Transistor, Capacitor)•Less expensive, High power

DRAM(Dynamic)

Page 6: Microcontroller overview 1

• ROM (Read only Memory)- Non Volatile Type Memory -Types

Memory

RAM ROM Flash Register

1- Memory

•One Time Programmable (OTP)•Cheaper than any other kind of semiconductot Memory

MROM (mask ROM)

•OR (FPROM) Filed programmable read only memory OR (OTP)•Digital memory (Fuse or Antifuse) one time programblePROM(Programmable Read

only memory)

•Or (UV-EPROM) can be erased by exposing into strong Ultraviolet•Array of floating Gate Transistors individually programmed by

Electronic Device EPROM(Erasable programmable Read only

Memory)

•User Modified •Can be programmable & erased in circuit EEPROM (Electrically

Erasable Programmable Read only Memory)

Page 7: Microcontroller overview 1

• Flash memory- non-Volatile Type Memory -More Economical than EEPROM- Flash is EEPROM That is erased in single stroke entire memory, EEPROM is single erase or byte wise Rewrite memory

Memory

RAM ROM Flash Register

1- Memory

Page 8: Microcontroller overview 1

• Special Function Registers (SFR) - Since their bits are physically connected to particular circuits within the microcontroller, such as A/D converter, serial communication module etc., any change of their state directly affects the operation of the microcontroller or some of the circuits.

For example, writing zero or one to the SFR controlling an input/output port causes the appropriate port pin to be configured as input or output. In other words, each bit of this register controls the function of one single pin.

Memory

RAM ROM Flash Register

1- Memory

Page 9: Microcontroller overview 1

• ADC- Is the Device that converts a continuous quantity to a Discrete time digital representation

*Resolution (Sampling process)The resolution of convert indicates the number of Discrete values it can produce over the range of analog values

> the values are usually stored electronically in binary form so the resolution is usually expressed in bit

• DAC– Convert the Digital signal to Analog

2- ADC & DAC

Page 10: Microcontroller overview 1

• Input/ Output port There are two main port types, parallel and serial,

- Parallel I/O requires a data line for each bit - Serial I/O uses a single line and transfers bits in sequence.

and two port modes, synchronous and asynchronous.- Synchronous I/O is synchronized to a clock

- Asynchronous I/O is not.

Microcontrollers most often have parallel I/O capability built in and serial I/O as peripheral feature.

3- Input / output Port

Page 11: Microcontroller overview 1

• Timer / Counter - A timer is a counter that is incremented at a fixed rate when the system clock pulses.- There are several different types of timers available. A timer/counter can perform several different tasks. - The CPU uses the timer

1- to keep track of time accurately. 2- timer can generate a stream of pulses or a single pulse at different frequencies. It can be used to start and stop tasks at desired times.

A COP (computer operating properly) or watchdog timer checks for runawaycode execution. The hardware implementation of watchdog timers variesconsiderably between different processors. In general watchdog timers must beturned on once within the first few cycles after reset and then reset periodicallywith software. (page 17, BC FirstSteps)

4- Timers/ Counter

Page 12: Microcontroller overview 1

• UART• SCI• SPI• I2C• CAN• LAN

5- Communication protocol

Page 13: Microcontroller overview 1

How choose Microcontroller?

BitsThe lengths of microprocessor’s data words.- 4-Bit

- The 4 bit microprocessor was the first one developed.- Microprocessors of this word length are still popular in some types of work

EX - The Intel 4004, the world's first commercially available single-chip microprocessor, was a 4-bit CPU. - The F-14 Tomcat's Central Air Data Computer (or F14 CADC) was created a year before the 4004

Page 14: Microcontroller overview 1

How choose Microcontroller?

BitsThe lengths of microprocessor’s data words.- 8-Bit

- The 8 bit word length is twice 4 bits. - The 8 bit word length can hold all the data needed for one character in American Standard Code for Information Interchange (ASC II)

EX- The Intel 8080 was The first widely adopted 8-bit microprocessor - The Zilog Z80 (compatible with the 8080) and the Motorola

Page 15: Microcontroller overview 1

How choose Microcontroller?

BitsThe lengths of microprocessor’s data words.- 16-bit

EX: PDP-11, Intel 8086, Intel 80286 and the WDC 65C816. The Intel 8088

- 32-bitEX: Intel 80960 family and Motorola M683xx and Intel/Atmel 251 family.

-32-bit instruction set architectures include the IBM System/360 and its 32-bit successors, the DEC VAX, the ARM architecture, the MIPS architecture, and the Intel IA-32.

Page 16: Microcontroller overview 1

How choose Microcontroller?

Memory/Devices Embedded

When an embedded system has an microcontroller unit that has all the functional blocks available on a chip is called an embedded microcontroller.

EX, 8051 having Program & Data Memory, I/O Ports, Serial Communication, Counters and Timers and Interrupt Control logic

ExternalIn external memory microcontroller, all or part of the memory units are externally interfaced using an interfacing circuit called the glue circuit. EX, 8031 has no program memory on the chip is an external memory microcontroller.

Page 17: Microcontroller overview 1

How choose Microcontroller?

Memory architecture Von Neumann Architecture:

In this architecture, program and data are stored together and are accessedthrough the same bus. - Unfortunately, this implies that program and data accesses may conflict (resulting in the famous von Neumann bottleneck), leading to unwelcome delays.

Harvard Architecture: This architecture demands that program and data are in separate memories which are accessed via separate

buses. - In consequence, code accesses do not conflict with data accesses which improves system performance. - As a slight drawback, this architecture requires more hardware, since it needs two busses and either

two memory chips or a dual-ported memory(a memory chip which allows two independent accesses at the same time).

Page 18: Microcontroller overview 1

How choose Microcontroller?

Instruction Set RISC: Reduced Instruction Set Computer Usually each instruction takes only 1 cycle to execute Emphasis on software Complexity on software side Register-to-Register : load and store are separate instructions SISC: Specific Instruction Set Computer Single Instruction may take more than 1 cycle to execute Complexity found in hardware Memory-to-memory : load and store functionality found in a single instruction

Page 19: Microcontroller overview 1

How choose Microcontroller?

Instruction Set RISC: all instructions of a uniform size instructions are easier to decode because of how they are set up-ex: opcode will

always be in the same place capable of using pipelining by design SISC: instructions not always the same size instructions are difficult to decode because instructions are not uniform to make use of pipelining, instructions need to be broken down to smaller

components at processor level

Page 20: Microcontroller overview 1

CISC vs. RISC

RISC: The Total clock cycles for the RISC version is: (3 movs × 1 cycle) + (5 adds × 1 cycle) + (5 loops × 1 cycle) = 13

cycles SISC: The total clock cycles for the CISC version might be: (2 movs × 1 cycle) + (1 mul × 30 cycles) = 32 cycles

Page 21: Microcontroller overview 1

List of common microcontrollers

This is a list of common microcontrollers listed by brand.

1 AMCC 2 Altera 3 Analog Devices 4 Atmel 5 Charmed Labs 6 Cypress Semiconductor 7 Dallas Semiconductor 8 ELAN Microelectronics Corp. 9 Energy Micro AS 10 EPSON Semiconductor 11 Freescale Semiconductor 12 Fujitsu 13 Holtek 14 Infineon 15 Intel 16 Lattice Semiconductor 17 Microchip Technology 18 National Semiconductor 19 NEC

20 Panasonic 21 Parallax 22 NXP Semiconductors 23 Rabbit Semiconductor 24 Renesas Electronics 25 Rockwell 26 Silicon Laboratories 27 Silicon Motion 28 Sony 29 STMicroelectronics 30 Texas Instruments 31 Toshiba 32 Ubicom 33 Xemics 34 Xilinx 35 XMOS 36 ZiLOG 37 Sortable table

Page 22: Microcontroller overview 1

Standard interface that can be controlled directly by microcontroller

PIC AVR ARM ArduinoDSPMSP430 TTL Logic