Embedded Flashcards

(100 cards)

1
Q

What is the role of the ACC register?

A

Main ALU operand/result register.

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

What is the B register used for?

A

Multiplication and division instructions.

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

Purpose of DPTR?

A

16-bit pointer for MOVX external memory access.

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

What is the PSW register?

A

Program Status Word: CY, AC, OV, P, RS1/RS0.

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

What are RS1 and RS0?

A

Bits selecting register bank 0–3.

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

Default stack pointer value?

A

07h.

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

Which port requires external pull-ups?

A

Port 0.

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

Purpose of Port 3?

A

Alternate functions: INT0, INT1, T0, T1, RXD, TXD, WR, RD.

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

Address range for internal RAM?

A

00h–7Fh.

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

Address range for SFRs?

A

80h–FFh.

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

Bit-addressable RAM range?

A

20h–2Fh.

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

Bit-addressable SFRs example?

A

TCON, PSW, ACC, B, Ports.

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

What does CY flag indicate?

A

Carry flag.

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

What does AC represent?

A

Auxiliary carry for BCD operations.

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

What does OV indicate?

A

Signed overflow.

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

What does P indicate?

A

Parity: 1=odd, 0=even.

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

When does parity flip?

A

Whenever number of 1s in ACC changes.

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

When does overflow occur?

A

If signed addition exceeds range -128 to +127.

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

Timer tick duration at 11.0592MHz?

A

1.085 microseconds.

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

Timer Mode 1 bit-width?

A

16-bit.

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

Timer Mode 2 bit-width?

A

8-bit auto-reload.

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

Meaning of C/T=0?

A

Counts internal clock (timer).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Meaning of C/T=1?
Counts external pulses (counter).
26
Formula for delay counts?
counts = delay / 1.085us.
27
Formula for load value?
Load = 65536 - counts.
28
Start Timer 0?
TR0 = 1.
29
Stop Timer 0?
TR0 = 0.
30
Timer 0 input pin?
T0 on P3.4.
31
Timer 1 input pin?
T1 on P3.5.
32
Gate bit=1 meaning?
Timer runs only when INT pin is high.
33
34
Global interrupt enable bit?
EA (IE.7).
35
Timer 0 interrupt enable bit?
ET0 (IE.1).
36
External interrupt 0 enable bit?
EX0 (IE.0).
37
Vector for INT0?
0003h.
38
Vector for Timer 0?
000Bh.
39
Vector for INT1?
0013h.
40
Vector for Timer 1?
001Bh.
41
Vector for Serial interrupt?
0023h.
42
Instruction ending ISR?
RETI.
43
Difference between RET and RETI?
RETI re-enables interrupt logic.
44
What generates INT0?
Edge or level depending on TCON.
45
TCON bit for INT0 edge sensitivity?
IT0.
46
What does IE control?
Interrupt enables.
47
What does IP control?
Interrupt priority.
48
49
UART Mode 1 description?
8-bit UART with variable baud.
50
Serial data register?
SBUF.
51
Serial configuration register?
SCON.
52
What does REN do?
Enables receiver.
53
What does TI indicate?
Transmit complete.
54
What does RI indicate?
Receive complete.
55
Baud rate formula?
Baud = (2^SMOD / 32)*(XTAL / (12*(256-TH1))).
56
TH1 for 9600 baud at 11.0592MHz?
FDh.
57
TH1 for 4800 baud at 11.0592MHz?
FAh.
58
What is SMOD?
Baud rate doubler (PCON.7).
59
60
ADC digital value formula?
D = Vin / (Vref / 2^n).
61
Resolution definition?
Smallest measurable change in voltage.
62
What is quantisation?
Approximating analog to nearest digital step.
63
10-bit ADC levels?
1024
64
Step size for 5V, 10-bit ADC?
4.88mV.
65
66
What is a transducer?
Converts physical quantity to electrical signal.
67
Direct vs indirect measurement?
Direct measures actual quantity
68
Gauge factor equation?
GF = (ΔR/R) / ε.
69
Strain equation?
ε = (ΔR/R)/GF.
70
Stress equation?
σ = E * ε.
71
Wheatstone output (single gauge)?
Vo ≈ (Vi/4)*(ΔR/R).
72
Why RTD accurate?
Linear, stable, precise.
73
Thermistor characteristic?
Non-linear, high sensitivity.
74
Thermocouple characteristic?
Wide temp range, low cost.
75
76
SPI wires?
MISO, MOSI, SCLK, SS.
77
I2C wires?
SDA, SCL.
78
UART wires?
TXD, RXD.
79
SPI duplex mode?
Full duplex.
80
I2C duplex mode?
Half duplex.
81
I2C addressing?
7-bit or 10-bit.
82
What defines SPI clock mode?
CPOL and CPHA.
83
CPOL meaning?
Clock polarity (idle high/low).
84
CPHA meaning?
Clock phase (sample 1st/2nd edge).
85
Which bus allows multi-master?
I2C.
86
Fastest bus?
SPI.
87
88
Components of an FSM?
States, events, transitions.
89
FSM coding pattern?
Nested switch-case.
90
Why use FSM?
Clarity, structure, reliable behaviour.
91
Example of FSM?
Vending machine.
92
93
Toggle bit in C?
P1 ^= 0x01
94
Start Timer1?
TR1 = 1
95
Clear Timer 0 flag?
TF0 = 0
96
Send char over UART?
SBUF = c
97
Read a pin?
if(P1 & 0x04){...}
98
Write pin high?
P2 |= 0x20
99
Write pin low?
P2 &= ~0x20
100
Delay loop example?
for(i=0