Architecture and PIC Flashcards
Lecture 2 (64 cards)
What is a micro-controller (MCU)?
A self-contained computing unit that can:
* Communicate with other logic devices via standard serial protocols (I2C, SPI)
* Interface with analogue sensors and actuators through GPIO ports
* Perform real-time control or monitoring tasks
* Include a power management unit to reduce power consumption
What can an MCU not do by default unlike an normal computer?
Drive a video output device or read from an input device such as a QWERTY keyboard
What components are typically found inside a micro-controller (MCU)?
A micro-controller typically includes:
* Central Processing Unit (CPU)
* Memory including program stores (FLASH/ROM) RAM (SRAM)
* Firmware (Timers, ADCs, DACs, Communication modules)
What is a CPU?
Central Processing Unit which runs programs and performs task.
To do this it needs to know:
– Where the next instruction can be found
– Where the data to be processed can be found
– How data (numbers) are represented.
– What to do with the data
– How to perform simple arithmetic/ logic operations
– How to sequence execution of the program
These are fuffiled by other parts of the microcontroller
What is the Fetch-Decode-Execute cycle?
A cycle used by a CPU to run programs, consisting of:
* Fetch an instruction from the program store
* Decode the instruction
* Execute the task of the instruction
What is the function of the Program Counter in a CPU?
It tells the CPU where to find the next instruction to fetch. The next instruction will be fetched into the instruction register
What is the role of the Address Decoder in a CPU?
Based on the address field of the instruction being decoded, determines the physical (hardware) position in memory where a given address is located
What does the Instruction Decoder do?
This makes sense of the opcode (instruction) stored in the instruction register and configures the control lines & ALU to perform the task of that instruction
What is the function of the Clock in a CPU?
It controls how fast data is transferred between the CPU and memory and how fast instructions are executed
What are File Registers in a CPU?
Memory locations that work at the speed of the processor core, used to store the value of variables
What are Accumulators used for in a CPU?
Registers that temporarily store the result computed by the ALU and can be used as intermediaries to move data around memory
What does the Arithmetic Logic Unit (ALU) do?
Performs computations, comparisons, and logic operations such as:
* +, -, /, *
* AND, OR
What is a Control Line in a CPU?
A 1-bit signal used to configure the behavior of hardware elements within a computer.
What is a Bus in computer architecture?
A collection of wires logically grouped to transmit more than 1 bit
A bus consisting of ‘n’ wires is called an “n-bit bus” and can transmit n-bits at any given instance of time
Types of buses include:
* Address Bus
* Data Bus
What is a good way to send data quickly between two points locally?
Multi-bit (parallel) bus connection whcih are parallel communication channels where several bits can be transmitted at the same time to send data to different parts of an MCU
What is RAM (Random Access Memory)/Data Store?
Volatile memory primarily used to store variable and sensor data as the program is running. This memory is implemented using Static RAM hardware (SRAM)
What is ROM(Read Only Memory)/Program Store?
Non-volatile permanent memory often used as a program store (program instructions).
A program store is implemented using:
* EEPROM – Electrically Erasable Read Only Memory
* EPROM – Erasable Read Only Memory
* FLASH – Similar to EEPROM, but you can update just parts of the memory
What is RISC and CISC?
Reduced Instruction Set Computer
Complex Instruction Set Computer
What is the main difference between RISC and CISC architectures?
RISC has small, fast instructions that fit into a single binary word typically take the same time to execute (the same amount of instruction cycles). Majority of these instructions can access any point of memory.
While CISC has large, slow instructions that can perform complex tasks efficiently. These instructions may need multiple fetches and have an unknown amount of instruction cycles.
True or False: A RISC machine generally requires more CPU clock cycles to run an individual instruction.
False
True or False: A RISC machine requires more instructions to perform a task.
True
What’s the difference between 8-bit, 16-bit or 32-bit MCU?
It is the maximun amount of binary values a MCU can handle
i.e. 32-bit MCU can only handle a 32-bit number
List the types of memory used within a micro-controller.
There are two main types of memory:
* Program store (non-volatile)
* Data store (volatile)
What is the purpose of a memory map?
It indicates where data can be placed or found within memory.