sw-microcontroller

 
CH1 MPU & MCU
Microprocessor is an integrated circuit in which CPU, ALU, and control functions are combined. It contains no on-chip memory and I/O ports.
Microcontroller is a single purpose processing unit designed to execute small control programs. A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of memory (RAM, ROM) , I/O ports, and other peripherals ( Timer, ADC etc) all on a single chip.
 
Flexibility:

MPU – An advantage of an MPU is versatility, the system designer can decide on theamount of RAM, ROM and I/O ports needed for the application. This is not the case with MCU.

MCU – The processor, the RAM, ROM, I/O ports and the timer are all embedded together on one microcontroller chip; therefore, the designer cannot add any external I/O ports, or timer to it.

Movement of Data:

MPU – An MPU is concerned with rapid movement of code & data from external addresses to the chip.

MCU – An MCU is concerned with rapid movement of bits within the chip.

Interface Circuit:

MPU – In addition, custom electronic circuit is required to interface the microprocessor with its external circuitry.

MCU – None is required in the microcontroller-based system, since most of the circuitry isalready inside the microcontroller.

 

Bus widths:

MPU – very wide ,Large memory address spaces (>4 Gbytes) , Lots of data (Data bus: 32, 64, 128 bits wide)

MCU – narrow , Relatively small memory address spaces (typically kBytes) , Less data (Data bus typically 4, 8, 16 bits wide)

 

Clock Rates:

MPU – very fast (> 1 GHz)

MCU – Relatively slow (typically 10-150 MHz) since most I/O devices being controlled are relatively slow


Instruction Set:

MPU vs MCU

–  The instruction set of the MPU is more powerful than that of the MCU. For example, instructions to support multitasking, memory management and floating point calculations.
–  MPU have many opcodes for moving data from the external memory to the CPU; MCU may have one or two.

  MPU may have 1 or 2 types of bit handling instructions; MCU will have many.

CH2. CISC & RISC
CISC:
Wide variety of instructions available
Registers often have special purposes and are notinterchangeable
Slow because of complexity of instruction set
Complex silicon design
Many of the instructions are not used often
Code size is lower
Optimization methods are more complicated
Instructions may be very specific to registers, data types oraddressing modes
A single specialized instruction may be able to do what would otherwise take multiple instructions
Will often take multiple cycles to execute a single instruction unless special performance measures like heavy pipelining are applied
CISC normally consists of more than 80 instructions
Examples of CISC microprocessors include Motorola's 68000 series and the family of Intel 80x86 and Pentium microprocessors 

RISC:
Of all available CISC instructions, only a small subset is commonly used =>RISC eliminates as many instructions to leave a minimal instruction set
Simple CPU design with fast instructions
Usually has a lot of general purpose registers
One or more instructions per clock cycle
Typical instructions less than 33
Less transistors=> less power consumption
Better performance per watt

Due to less complexity, more peripherals can be supported onchip.
Performance enhancement mechanisms such as pipelining are easier to manufacture
Examples of RISC microprocessors include the PowerPC, PICetc. 

CISC/RISCConvergence:

Difference is not in number of instructions
Difference is in structure of instructions 
Modern CISCs use a RISC internally

CH3. Von-Neumann & Havard

Von-Neumann

A single "data" bus that is used to fetch both instructions and data. Program instructions and data arestored in a common main memory

Havard:

Instructions and data reside inphysically separate memories and are connected to CPU through separate busses


Instructions in non-volatile memory anddata in Read/Write memory with separate address spaces

Data and instruction width independent of each other
Different program and data bus widths arepossible, allowing program and data memory to be better optimized to thearchitectural requirements.  So Arm and Thumb???


CH4. generating systemclock
Externalclock
InternalOscillator
PhaseLocked Loop 
PLL:
Advantages
–Low-frequency crystals are cheap and easyto use
–Lower EMI because the high frequencyclocks are contained within the Microcontrollers
Disadvantages
–System Clocks with the PLL takes time to stabilize
»PLL Lock Delay

PLLBlocks:
Voltage Controlled Oscillator
–Controlled by a DC voltage
–Tuning range is centered about thedesired system clock frequency
Phase/Frequency Comparator
–Puts out a voltage proportional to thephase and/or frequency difference between the two inputs signals
Filter/Amp
–Filters comparator output to ensure loopstability
–The loop will not be stable if the VCOoverreacts to small frequency errors (Glitches)
Frequency Divider
–Matches the VCO frequency to thereference frequency


CPU clock may also be supplied to
–Bus controller
–Memory controller
–ROM
–RAM
–Interrupt controller
–DMA controller

Peripheralclock is generally a prescaled CPU clock

OperatingModes
–NormalMode
–PowerSaving Modes
»Idle/SleepMode
»HaltMode

For some microcontrollers, a specialtimer/counter causes the chip to wake up at a regular interval to check ifthings are OK. 

Halt Mode?
–All activities are stopped (includingtimers and counters).
–The only way to wake up themicrocontroller is by a reset or device interrupt.
–The power requirements of the device areminimal
–RAM is not cleared and any outputs arenot changed.


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值