Microprocessor systems (week 2) Flashcards
what are microprocessors?
Brain of mechatronic system. Processes the data and does all the arithmetic. In this module, only concerned with embedded microprocessors (human intervention not required, self starting, self contained)
e.g. Atmel ATMega family
What is the composition of microprocessors ?
1) Arithmetic and logic unit - ALU
2) Registers
3) Control unit
4) Buses
Microprocessor - What is/What does ALU?
-Performs mathematical/logic operations
-most important part when deciding computing power of microprocessor
-different types of ALUs;
1) 8, 16, 32, 64 bits
2) nb of cycles for operation
3) floating point vs fixed point.
MATHEMATICAL BRAIN OF COMPUTER. Handles all numerical operations ( adding, subtracting, incremental). It can build components out of logic gates
Microprocessor- What are registers ?
They are memory locations to store data WITHIN microprocessor
2 categories:
- SPECIAL FUNCTION REGISTERS (SFRs), used to control the microprocessor itself or perform specific functions.
SFRs include
a) accumulator or working register (operands for ALU)
b) Flag registers (contains info - code- about latest ALU operation)
c) Program counter (controls flow of code)
d) Instruction register (stores next instruction to be executed)
e) stack pointer ( used to manage subroutines and interrupts) - GENERAL PURPOSE REGISTERS
usually, memory locations available for the user.
Microcontroller- What are the two main architectures of memory in the microcontrollers ?
TWO MAIN ARCHITECTURES:
-Von Neumann ( data AND instructions -code- in same memory), called the SHARED MEMORY
- Harvard ( memory split up between “data memory” and “code memory”.
Microcontroller - What are the common types of Memory ?
1) ROM:
‘read only’, data stored during manufacturing process, cannot be written by user, not lost when power removed
2) EEPROM
electrically erasable programmable ROM-can be written with special devices/procedures but not modified by code. Power removed and no lost content.
3) RAM :
‘ Random Access Memory’ Used to store temporary data, loses content when power is removed.
Microcontroller- what application of Memory LOCATIONS
ROM -> Firmware
EEPROM -> code
RAM-> User data
Microprocessor- CONTROL UNIT (CU), what is it?/ what does it do ?
Controls timing and sequence of operations (generates clocks for other components, fetches instructions from memory, executes instructions by controlling other units).
Microprocessor-CU- How the number of clocks varies upon CU architecture ?
1) CISC: Complex Instruction set computing- Each instruction can take more than one cycle time, and different instructions can have different amount of clock cycles ( cycle time VARIES)
RISC: Reduced Instruction set computing - All instruction takes a=FIXED amount of clock cycles. (1/2)
Microprocessor - BUSES, what are they ?
Just like real bus they transport elements, in this case, DATA.
What are the different types of buses ?
1) DATA BUS: transport a word (number of bits) from/to the CPU and the memory of the I/O peripherals
2) ADDRESS BUS: Selects memory location to load data from or store data in. Can also be used to address peripherals (only in specific architectures—memory-mapped I/O).
3) CONTROL BUS :
carries clocks signals to synchronize other units/ peripherals
Microcontrollers-peripherals-What are peripherals ?
They are devices to exchange data with the external world, also called PORTS
Microcontrollers-PERIPHERALS-what are the two main types of peripherals ?
- DIGITAL I/O: Data is in BINARY form, each pin controls one bit. (0=low, 1=high).
-ANALOG I/O: data is a continuous voltage between 0 and a max value. Attached to one or more A/D converters inside microcontroller.
Microcontrollers-PERIPHERALS-what are the two main architectures of peripherals?
1) Memory-mapped I/O:
data from peripherals is mapped to SFRs, address bus used both for memory AND peripherals, code can access such data in the same way it does with memory locations.
2) Port-mapped I/O
A separate bus connect CPU with peripherals. CPU must have dedicated instructions to access I/O devices (REQUIRES CISC architecture).
Arduino platform-applications of Microcontrollers ?
used extensively in automotive
used in cost sensitive mechanical and electrical products. Their uses range from engine management systems, machine tools, chemical plant…consumer white goods (e.g washing machine & robotic vacuum cleaner, automatic camera, mobile phone, peripherals).