Microcontroller Architecture Flashcards

1
Q

What are the advantages/disadvantages of a microprocessor/microcontroller?

A

Microprocessor:
High speed processing of large data sets
High current drain

Microcontroller:
Slow speed processing of small data sets
Greater control over current drain
Good peripheral connections and in-built functions (e.g. ADCs)

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

What are the 2 general types of memory and what properties do they have?

A

RAM:
Power required to maintain stored info, data lost at power off, contains junk at start/power-up

ROM:
Data retained when not powered
Contains last stored data when powered on
Can’t be written to during normal operation

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

What is an example of volatile memory?

A

SRAM (Static RAM):
Used as temp. storage
Fast read/write

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

What are 2 examples of non-volatile memory?

A

EEPROM:
Field programmable (re-programmable)
Individual bytes/parts of data can be erased without effecting rest of data

Flash:
Data erased in blocks
Cheaper than EEPROM and faster to program

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

What are the 2 main microcontroller architectures and how are they connected?

A

Von-Neumann:
Data & program share memory
1 address and 1 data bus
Instructions fetched sequentially

Harvard:
Data & program have separate memories
Instructions and operands fetched in parallel

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

What is the data memory map?

A

Shows which addresses are allocated for what purpose
–> indicates how memory is laid out/structured

General purpose registers used by CPU
Input-output registers that control IO and peripherals

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

What is the stack? What may cause a stack overflow?

A

A LIFO memory buffer
Saves return address in code when a function is called
Often within the SRAM, small size
If lots of functions are called the stack may overflow as it it storing lots of addresses, requires recovery by resetting chip

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

What is a watchdog timer and how does it work?

A

Resets the device if software crashes

Uses a dedicated RC oscillator that periodically resets a timer, if WDT counter overflows the chip is reset.

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