.131 WK 7-10 Flashcards

Microprocessor - Ioannis Chatzigeorgiou (43 cards)

1
Q

Define runtime code/software:

A

software platform that provides an environment for executing user code - serves as an abstraction layer that developers can use to write software

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

Define a microcontroller unit (MCU):

A

compact integrated circuit equipped w/ 1 or more CPUs + memory - similar to a system on a chip

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

Define an embedded system:

A

electronic product comprised of one or more microcontrollers executing software instructions stored on a memory module to perform an essential function

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

Which component streams data to/from the microbit and provides power?

A

micro USB

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

What does a micro USB do?

A

streams data to/from the microbit and provides power

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

What does the ARM Cortex-M4F processor deal with?

A

interface that handles USB connection - used for flashing code + Tx/Rx data to/from devices

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

What does the ARM Cortex-M4 32-bit processor deal with?

A

user + runtime code + Bluetooth stack can run from flash memory, custom radio capabilities + integrated temp sensor

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

Which processor deals with the USB connection?

A

ARM Cortex-M4F

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

Which processor deals with user + runtime code?

A

ARM-Cortex-M4 32-bit

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

How does the microbit communicate?

A

via BLE antenna - peripheral that talks to central devices only + also uses radio to communicate w/ other microbits!!

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

What does the motion sensor include?

A

an accelerometer + magnetometer - sensor will either be LSM or FXOS

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

How does the microbit connect to external components?

A

clips/plugs to the edge connector - 20 pins/strips with 5 rings

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

What does the regulator do?

A

steps down voltage

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

What is Xtal for?

A

electronic crystal oscillator that provides clock signal

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

What buses are there in a microbit?

A

SWD, UART, I2C (external + internal)

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

What does SWD do?

A

stands for serial wire debug - for programming target MCU (processor)

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

What does UART do?

A

stands for universal asynchronous receiver transmitter - for exchanging data w/ device connected via USB

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

What does I2C do?

A

stands for inter-integrated circuit bus - allows main component (target MCU) to communicate w/ secondary components

19
Q

Which bus deals with programming target MCU?

20
Q

Which bus deals with data for device connected via USB?

21
Q

Which bus deals with communication between the target MCU and secondary components?

22
Q

what does the MicroBit class do?

A

consists of variables + methods that operate as drivers to control commonly used microbit features
instantiate as MicroBit uBit;
then initialise with uBit.init();

23
Q

what modes can you set uBit.display to

A

setDisplayMode(x):
-DISPLAY_MODE_BLACK_AND_WHITE = each pixel is on/off (can control brightness but for ALL) - most efficient (processing time + battery power)
- DISPLAY_MODE_BLACK_AND_WHITE_LIGHT_SENSE = same as above but display drivers also sense ambient brightness from LEDs
- DISPLAY_MODE_GREYSCALE = each pixel can independently have 256 levels of brightness

24
Q

How to intialise an MicroBitImage?

A

MicroBitImage var (“0, 255, 0, 0, 0\n…);
OR
const unint8_t var[] = {0, 1, 0, 0…); then MicroBitImage image (5, 5, var);

25
How to display an image?
uBit.display.print(image);
26
How to change pixel in image?
image.setPixelValue(x, y, 0/1);
27
How to find value of pixel in image?
uBit.display.image.getPixelValue(x,y)
28
What button objects are available?
uBit.buttonA, uBit.buttonB (MicroBitButton) + uBit.buttonAB (combined input - MicroBitMultiButton)
29
How to find out if a button has been pressed?
.isPressed() - returns 1 if pressed and 0 if not
30
What deals with asynchronous programming for microbits?
message bus can listen for events + call a function (event handler) when it occurs uBit.messageBus.listen(component, event, function);
31
What does release_fiber() do?
stops the end of execution so the program will wait and listen for events even if the compiler has reached the end of the program
32
What is the wildcard for events?
MICROBIT_EVT_ANY
33
What does uBit.thermometer.getTemperature() do?
gets integer value representative of surface temp of application MCU (not the ambient temp!!)
34
What does the log do?
enables a table-like format containing rows of readings/data
35
What are the functions associated with log?
beginRow() - open file + create new row logData("column label", "value") = add data endRow() = complete logging + close file
36
How to make log file visible in file explorer?
uBit.log.setVisibility(true);
37
What is firmware?
midway between hardware + software permenant software that provides low-level control of device hardware
38
What is the firmware for a microbit?
DAPLink open-source interface firmware
39
What does DAPLink do?
- creates bridge between PC + SWD - micro:bit presents self like a USB disk - enables drag + drop programming w/o installing drivers - compatible w/ Windows, MacOS + Linux (mainly Linux) - Interface mode - hex file dropped onto USB disk is written to target MCU flash - name of USB disk = MICROBIT - Bootloader mode - hex file dropped onto USB disk is written to interface MCU flash + updates version of DAPLink - name of USB disk = MAINTENANCE
40
What software does the microbit have?
- nRF5 Software Dev. Kit - Component Oriented Device Abstraction Layer - Porgraming Lanaguages - Python, C/C++ and MakeCode
41
Microbit software: nRF5 Software Dev. Kit
- rich development environment for nRF52/52 sereies MCUs - provides hardware abstraction - inc. drivers, libraries, example peripherals + radio protocols
42
Microbit software: Component Oriented Device Abstraction Layer
- micro:bit runtime software - C/C++ - abstracts hardware components as software components rep by C++ classes - offers eventing subsystem for mapping asynchronous events to event handlers
43
Microbit software: Programming Languages
- interpreted (Python) - user code + interpreter are copied into target MCU -allow users to program micro:bit live over USB - compiled (C/C++) - user code is compiled → ARM assembly - editors (MakeCode) - high-level programming using blocks