Microcontrollers exam Flashcards
Characteristics of a PC computer
Fixed location
Linked to mains power
Extendable buses
Add memory
Add devices
Examples of distributed control systems
Protection systems
Data housing
R&D
Education
What is telemetry
Taking data from a distance and feeding it into a computer system
Components in a microprocessor
CPU - brains of the operation, will be executing the code you have loaded on to it
ALU - optimised to carry out AND/OR/NOT operations
FPCP - optimised to carry out mathematical operations
ROM
RAM
BIOS - low level code (firmware)
ADC
DAC
What is RISC and CISC
Reduced instruction set computer (microprocessor uses this) - 50/60 instructions
Complex instruction set computer - 500+ instructions
Characteristics of microcontroller
Small, mobile, standalone, battery powered, fixed, can be embedded
Differences between Harvard and Von Neumann
VN: Uses one memory unit for both instructions and data
H: Has separate memory units for instructions and data
VN: Uses one set of buses for both instructions and data
H: Has separate buses for instructions and data
VN: Commonly used in general purpose computers
H: Commonly used in embedded systems (e.g. digital signal processing)
VN: Enables a more flexible use of main memory, enabling the processor to run a variety of programs that aren’t necessarily known in advance
H: For systems with a predetermined use, instruction memory can be implemented as ROM which protects the programs from hacking
4 advantages of Harvard
⏰️ Instruction and data can be accessed simultaneously
📝 Instruction and data memory can have different word lengths
🤖 Different technologies can be used to implement instruction and data memory
🧑💻️ For systems with a predetermined use, instruction memory can be implemented as ROM which protects the programs from hacking
Name some microcontrollers
Arduino
Raspberry Pi
Where is power indicator (1)
(2)
Where is USB in (1)
(3)
Board rate =
Bits per second
Where is DC power in (power supply) (1)
(4)
draw the diode bridge
(5)
voltage drop of a diode
0.7V
(6)
Time period = 0.1s
so t = 0.1
r*C = 0.01
7.6e^0.01/0.1
Where does the battery go (Vin) (1)
(9)
draw a zener diode
(10) doesn’t have line through the middle
draw a circuit for a regulated voltage supply to a microcontroller
(12)
Draw IV for zener diode
(11)
(13)
Vr = Vin - Vz
Vr = 7-5.1 = 1.9
I = 1.9/100 = 19mA
Power in r = Iz^2 * r
=0.019^2 * 100 = 0.0361W
Pz = Vz * Ir
= 5.1 * 0.019 = 0.0969W
identify which is harvard and which is von neumann
insert pic
Draw SBD for the schematic
(13)
What is pin 1 used for
It is a serial pin for if you did not want to use a USB cable
(14)
write psuedo code using an active low
logic is reversed, 0 means LED on and 1 means lED off
draw arduino circuit with a tilt switch
(15)
draw LED symbol
(16)
what is the forward voltage of bright red and what current does it need to work (17)
2-2.5
20mA
Draw an arduino schematic with a mechanical push switch and a capacitor in parallel with the 10k resistor. Calculate the size of the capacitor
(19)
C = 0*10^-6
Draw schematic with BCD chip integrating a 7 seg display
(22)
3
write code to read a byte from digital input 0
and then output 0x79 to channel 0
diginByte0 = digitalRead(DI0)
digoutByte0 = 0x79
digitalWrite(0, digoutByte0)
convert 0x79 to 7 seg display
letter E
convert to binary and then apply to 7 seg display
what is a masking operation
bitwise AND the byte with a 1 where you are looking at and if the answer is the masking operation = true
how do you set a bit in a byte to 1
OR it with a 1 where the bit is and the rest of the byte is 0s
how to set a bit in a byte to 0
AND the byte with another byte which has all 1’s except a 0 for the bit you want to change to 0 (its complement)