108 Flashcards

1
Q

What is a microcontroller? (5)

A

> Computer on a single chip
Used in embedded systems
Contains the CPU, Memory and peripherals
Software is programmed on a separate computer and then compiled into a list of instructions which are copied to the microcontroller. This is called firmware
Microcontrollers execute instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the different types of microcontroller architecture? (4)

A

> Instruction set architecture
Microarchitecture
System architecture
Load store architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is ISA?

A

> Instruction Set Archetecture

> Instructions that the microcontroller can execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is microarchitecture?

A

This is the way that the ISA is implemented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is system architecture?

A

The overall design of the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is load store architecture?

A

The way that data is moved around the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a CPU?

A

This executes the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is memory?

A

This stores data and instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the different parts of a CPU?

A
> Program counter
> Incrementor
> Memory address register
> Memory buffer register
> Instruction register
> Control unit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the program counter?

A

Contains the address of the next instruction to be counted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the incrementor?

A

Increases the value stored in the Program counter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the memory address register?

A

Stores the address of the memory being used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the memory buffer register?

A

Stores data that has just been read from memory or data that is to be written

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the instruction register?

A

Stores the instruction that currently being executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the control unit do?

A

Controls the CPU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the architecture of memory?

A

> Byte organised
Each location in memory can store an individual byte
Each location has a unique binary address

17
Q

How is data stored in memory?

A

> Stored in words of size 32 bits (4 bytes)

> Words must be stored in an address that is a multiple of 4 for best packing

18
Q

What are the 2 memory types and what is the difference?

A

> Flash - Stores instructions and is non-volitile

> RAM - Stores data and is volitile

19
Q

What is the instruction execution cycle?

A

The computer will fetch an instruction and execute it in 3 steps:
> Fetch
> Decode
> Execute

20
Q

What happens during the fetch part of the instruction execution cycle?

A

> The program counter (PC) increases and outputs the binary value to the Memory address register (MAR)
The MAR points to the location in memory given to it by the program counter
The memory is read and the instruction stored within is copied to the Memory buffer register (MBR)
The content of the MBR is copied to the Instruction register
The value in the PC is incremented

21
Q

What happens during the decode part of the instruction execution cycle?

A

> The instruction register (IR) is decoded
Types of instructions
• Data processing
• Loading data
• Storing data
The control unit will determine the kind of instruction that is stored in the IR and how to proceed

22
Q

What is an example of a load-store architecture?

A

> A Microcontroller is an example of a LOAD-Store architecture
• Only data stored in registers can be operated
on
• Data In main memory cannot be operated on

23
Q

What happens during the execution part of the instruction execution cycle?

A

> Executes the instruction decoded by the control unit

24
Q

What are some of the different types of instructions and how they are executed? (3)

A

> Load instructions
• Loads data from memory and writes it to a
register in the register bank
• The address of the memory location to read
from may be stored in another register
Data processing instruction
• The ALU will carry out the operation
• The result of the operation is put back into a
register
Store instruction
• Moves data from the register bank to the main
memory

25
Q

What is pipelining?

A

Each step of the instruction execution cycle takes up a clock cycle and so it takes 3 clock cycle to execute an instruction so pipelining means that steps are queued up so that while an instruction is being executed another is being decoded whilst another is being fetched.

26
Q

What is instruction set architecture?

A

> Instruction set architecture outlines which instructions can be carried out by a computer

27
Q

What type of instruction set architecture does a microcontroller have?

A

> A microcontroller is an example of a Reduced Instruction Set Computer (RISC) so has a limited number of instructions

28
Q

How are instruction sets represented? and What code are instruction set architecture written in?

A

> Instructions are represented as mnemonics
Assembly is computer written code using these mnemonics
An assembler is used to convert code into machine code (1’s and 0’s)

29
Q

What is the format of an instruction?

A
> 16 bit
> (3 Bits) Instruction Type
> (4 Bits) Op-Code
> (3 Bits) Rd
> (3 Bits) Ra
> (3 Bits) Rb
30
Q

What is RISC? What does it stand for?

A

> RISC - Reduced instruct set computer

> A type of architecture with fewer instructions so it more simple

31
Q

What are the benefits and drawbacks of RISC?

A
Benefits:
> Less expensive
> Simpler
> Pipelining can be used
> Instructions are easier to decode
Drawbacks:
> Longer programs with more instructions
> Requires more complex programming and harder to program
32
Q

What is CISC? What does it stand for? What is its benefit?

A

> CISC - Complex instruct set computer
A type of architecture with more instructions and a more complex processor
Simpler coding

33
Q

LEARN THE LAYOUT OF A MICROCONTROLLER

A

DO IT

34
Q

What is the Von Neumann architecture?

A

CPU reads and writes to one memory module containing everything through a BUS

35
Q

What is the Harvard architecture?

A

> CPU reads and writes to multiple memory modules each containing different things e.g. Instructions, RAM etc
Microcontrollers are usually a Harvard architecture

36
Q

How is a memory connected to the CPU in an ARM processor? What is the benefit of this?

A

With I-Code and D-Code

> With 2 busses this allows a higher performance when fetching instructions

37
Q

What do peripherals do? and how are they enabled?

A

> They enable the micro-controller to interface with sensors and displays
They each have a register and are memory mapped
They appear to be within the memory even though they are physically separeate