Analogue and Digital Input-Output Flashcards

1
Q

What are the advantages of digital signals?

A

Accurate, good immunity to noise and signal degradation

Compatible with peripherals

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

For an n-bit ADC, what is the voltage resolution and voltage error?

A

Voltage res. = Vref/2^n

Voltage err. = Vref/2^n+1

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

Briefly explain how a successive approximation ADC works.

A

Analogue input is fed into circuit
Conversion logic starts with a guess of the voltage (in binary)
This binary is converted to analogue using a DAC and compared to the input voltage
Conversion logic increases/decreases the binary value and repeats until the input voltage is matched/is as close as possible

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

What limits the sampling rate of an analogue signal?

A

The ADC response time

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

What is aliasing and how is it prevented?

A

If an input analogue signal is sampled at a rate slower than the freq. of the signal, the reconstructed waveform appears to be of a lower freq.
Need to sample at a freq. at least 2 times more than signal freq. –> Nyquist theorem

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

What is the 1.1V internal voltage, why is it sometimes used, what limitations does it have and how are they overcome?

A

Generated internally by the microcontroller due to the physical nature of silicon.
It is sometimes used when measuring equipment is battery powered –> As battery voltage decreases, so will accuracy of ADC if using a Vref connected to battery, using 1.1V prevents this.
1.1V is stable with time and temp. BUT varies across a batch of chips by +/- 0.1V, o/p to a pin to be measure when system is built.

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

What are some sources of noise and error in a microcontroller, and how is it reduced?

A

Electromagnetic inteference
Gain error in comparator
Noise in Vref
Systematic error caused by inaccurate Vref
Clock edges –> can be switched off, reducing power consumption and local noise. Some can idle whilst conversion is occurring

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

How does a hardware debounce solution work? Draw a circuit diagram.

A

Resistor-capacitor circuit connected to Schmitt trigger which squares up waveform

Switch closed:
C discharges through resistor, R2 slows the voltage change.

Switch open:
Capacitor charges slowly through resistor.
R1, R2 & C smooth out the bounce when switch bounces

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

How does a software debounce solution work?

A

Hardware adds expense
Input is sampled several times over a defined time period, input is only considered to be stable if all samples are the same

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

What is pulse width modulation?

A

PWM switches a voltage on/off rapidly, the time spent high is called the duty cycle and is used to change the avg. voltage.
E.g. can be used to control a motor –> gives greater control over speed and allows motor to accelerate/decelerate.

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

What is the equation for the average voltage of a PWM?

A
Vav = D*Vhigh + (1-D)*Vlow
D = duty cycle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly