diff --git a/presentations/AnalogL1/presentation.html b/presentations/AnalogL1/presentation.html
index 37b6fa0..2a2982f 100644
--- a/presentations/AnalogL1/presentation.html
+++ b/presentations/AnalogL1/presentation.html
@@ -287,7 +287,7 @@
- A source that produces a nearly sinusoidal AC voltage is provided to you
- The voltage generated by this source can be expressed in time-domain as
-\\[ v\_{L(t)} = V\_{L(pk)}sin \left( \omega\_{L} t \right) \quad \text{where} \quad \omega\_{L} = 2 \pi f\_{L} = 1000 \pi \quad \because \ f\_{L} = 500Hz \\]
+\\[ v\_{\text{L}}(t) = V\_{\text{L(pk)}}\sin \left( \omega\_{\text{L}} t \right) \quad \text{where} \quad \omega\_{\text{L}} = 2 \pi f\_{\text{L}} = 1000 \pi \quad \because \ f\_{\text{L}} = 500\,\text{Hz} \\]
- RMS of this voltage, VL, can be set to between 13.6VRMS and 15.4VRMS via a software application
- This AC source needs to be powered by providing 30VDC from a bench-top DC power source
- It employs a switched-mode converter to synthesize an AC output voltage from a DC input voltage
@@ -301,7 +301,7 @@
- A load that consists of a fixed inductor, LL, in series with a variable resistor, RL, is provided to you
- The impedance of this load can be expressed in the phasor-domain as
-\\[ Z\_{L} = R\_{L} + j \omega\_{L} L\_{L} \quad \text{where} \quad \omega\_{L} = 2 \pi f\_{L} = 1000 \pi \quad \because \ f\_{L} = 500Hz \\]
+\\[ Z\_{\text{L}} = R\_{\text{L}} + j \omega\_{\text{L}} L\_{\text{L}} \quad \text{where} \quad \omega\_{\text{L}} = 2 \pi f\_{\text{L}} = 1000 \pi \quad \because \ f\_{\text{L}} = 500\,\text{Hz} \\]
- The inductor has a fixed inductance of 4mH ± 20%
- The resistance of the variable resistor can be set between 5Ω and 105Ω using the knob
- Helps control complex power of the load to between specified 2.5VA and 7.5VA
@@ -431,7 +431,7 @@
- Voltage is a measure of the charge imbalance that provides the force to move the electrons through a circuit branch
- Resistance of a circuit branch is a measure of how hard it is for the electrons to flow through that branch
- Ohm's law relates voltage, current and resistance of a resistor
-\\[ V\_{DC} = I\_{DC}R \quad \text{OR} \quad v\_{(t)} = i\_{(t)}R \\]
+\\[ V\_{\text{DC}} = I\_{\text{DC}}R \quad \text{or} \quad v(t) = i(t)R \\]
]
.right-column[
@@ -507,27 +507,27 @@
@@ -851,10 +851,10 @@
- We need to consider the highest i
L to be measured measured to ensure P
is-loss ≤ 50mW
- Highest I
L(RMS) is at lowest V
L(RMS) and highest VA specified (i.e., I
L(RMS) = 7.5VA/13.6V = 0.55A
RMS)
- Using this information we can derive the relation
-\\[ P\_{is-loss} = I^2\_{L(RMS)} R\_s \quad \Rightarrow \quad 0.05 \geq 0.55^2 R\_s \quad \Rightarrow \quad R\_s \leq 165 m\Omega \\]
+\\[ P\_\text{is-loss} = I^2\_\text{L(RMS)}\cdot R\_\text{s} \quad \Rightarrow \quad 0.05 \geq 0.55^2 R\_\text{s} \quad \Rightarrow \quad R\_\text{s} \leq 165\, \text{m}\Omega \\]
- If R
s is choosen as 160mΩ, V
is measured at both highest and lowest i
L are
-\\[ V\_{is(pk-pk)-highest} = 0.55\times 2\sqrt{2}\times 0.16 \approx 250mV \\]
-\\[ V\_{is(pk-pk)-lowest} = 0.16\times 2\sqrt{2}\times 0.16 \approx 72mV\\]
+\\[ V\_\text{is(pk-pk)-highest} = 0.55\times 2\sqrt{2}\times 0.16 \approx 250\, \text{mV} \\]
+\\[ V\_\text{is(pk-pk)-lowest} = 0.16\times 2\sqrt{2}\times 0.16 \approx 72\, \text{mV}\\]
- To determine an appropriate value for R
s we need to minimize P
vs-loss, size and cost while making sure sufficiently large signal-to-noise ratio (SNR)
---
diff --git a/presentations/AnalogL6/presentation.html b/presentations/AnalogL6/presentation.html
index 750f105..237c333 100644
--- a/presentations/AnalogL6/presentation.html
+++ b/presentations/AnalogL6/presentation.html
@@ -255,7 +255,7 @@
# Resistors
- The DC resistance of a conductor made using a material with a resistivity, ρ, has a cross-sectional area, A, and a length, l, is given by,
-\\[ R\_{dc} = \frac{\rho l}{A} \\]
+\\[ R\_\text{dc} = \frac{\rho\cdot l}{A} \\]
- A resistor is thus made using a conductor that has specific length and a cross-sectional area, which gives the required resistance
- The conductor is typically arranged as a helix to reduce the size of the resistor
- As a practical resistor uses a certain length of wire,typically in a helix arrangement, it not only has resistance but also has some inductance
@@ -401,7 +401,7 @@
# Capacitors
- The capacitance of a capacitor made using two conducting plates, where each plate has an area, A, separated by, d, and uses insulation material between the plates with a permittivity, ε
rε
0, is given by,
-\\[ C = \frac{\epsilon\_r \epsilon\_0 A}{d} \\]
+\\[ C = \frac{\epsilon\_\text{r} \epsilon\_0 A}{d} \\]
- A capacitor is thus made using conducting plates that has specific area and a separation, which gives the required capacitance
- The plates typically arranged like a multilayer "wrap" to reduce the size of the capacitor
- A practical capacitor not only has capacitance but also has some inductance and resistance
diff --git a/presentations/DigitalL1/presentation.html b/presentations/DigitalL1/presentation.html
index 7968885..3b234d9 100644
--- a/presentations/DigitalL1/presentation.html
+++ b/presentations/DigitalL1/presentation.html
@@ -988,7 +988,7 @@
# Example: Reading Input & Driving LED (PI)
.questions[
-Develop a program to read the input from a push-button and control an LED. As shown by the Proteus schematic below, one end of the push-button is connected PB7 on ATmega328P while the other end is connected to the ground. The pull-up resistor, `\( R_1 \)`, ensures the voltage at PB7 is pulled to 5V (i.e. VCC supplied to the MCU) when the push-button is released. The filter capacitor, `\( C_1 \)`, is used for debouncing. When the push-button is pressed it creates 0V at PB7, when released PB7 will be 5V. LED is connected to PB5 through a current limiting resistor, `\( R_2 \)`. Generating 5V at PB5 will create a current to flow turning-on the LED (i.e. `\( I_{LED} = \left ( 5 - V_{f} \right ) / R_2 \)` where `\( V_f \approx 2V\)` for a yellow LED). Setting PB5 to 0V will turn-off the LED.
+Develop a program to read the input from a push-button and control an LED. As shown by the Proteus schematic below, one end of the push-button is connected PB7 on ATmega328P while the other end is connected to the ground. The pull-up resistor, `\( R_1 \)`, ensures the voltage at PB7 is pulled to 5V (i.e. VCC supplied to the MCU) when the push-button is released. The filter capacitor, `\( C_1 \)`, is used for debouncing. When the push-button is pressed it creates 0V at PB7, when released PB7 will be 5V. LED is connected to PB5 through a current limiting resistor, `\( R_2 \)`. Generating 5V at PB5 will create a current to flow turning-on the LED (i.e. `\( I_\text{LED} = \left ( 5 - V_\text{f} \right ) / R_2 \)` where `\( V_\text{f} \approx 2\, \text{V}\)` for a yellow LED). Setting PB5 to 0V will turn-off the LED.
]
.center[
diff --git a/presentations/DigitalL2/presentation.html b/presentations/DigitalL2/presentation.html
index c6b41b1..a24d2aa 100644
--- a/presentations/DigitalL2/presentation.html
+++ b/presentations/DigitalL2/presentation.html
@@ -712,7 +712,7 @@
- The UBRR0 value defines the prescaler applied to used to the system clock (f
osc) to obtain the UART clock (i.e. UART clock = (f
osc / (UBRR0 + 1))
- Under normal operation the UART clock needs to be 16 times the baud rate and therefore
-\\[ \text{Baud Rate} = \frac{f\_{osc}} {16 \times \left( UBRR0 + 1 \right) } \quad \text {or} \quad UBRR0 = \frac {f\_{osc}} {\left( \text {Baud Rate} \right) \times 16} - 1\\]
+\\[ \text{Baud Rate} = \frac{f\_\text{osc}} {16 \times \left( \mathtt{UBRR0} + 1 \right) } \quad \text {or} \quad \mathtt{UBRR0} = \frac {f\_\text{osc}} {\left( \text {Baud Rate} \right) \times 16} - 1\\]
---
name: S29
diff --git a/presentations/DigitalL3/presentation.html b/presentations/DigitalL3/presentation.html
index 71af05e..96528a8 100644
--- a/presentations/DigitalL3/presentation.html
+++ b/presentations/DigitalL3/presentation.html
@@ -357,7 +357,7 @@
# The Sampling Process
- The size of the time intervals the signal is split into, referred to as sample time, is dependent on the sampling frequency (also called sampling rate), measured in hertz
-\\[ t\_{sample} = \frac{1}{f\_{sample}} \\]
+\\[ t\_\text{sample} = \frac{1}{f\_\text{sample}} \\]
- Higher sampling rates allow the original analog signal to be captured more accurately
- However this requires faster ADC hardware, and more memory to store the digital data
- To accurately capture a signal the sampling rate must be greater than the Nyquist frequency
@@ -401,7 +401,7 @@
- Total sampling time
- This is the total time taken to make a single ADC reading and is therefore the sum of both the acquisition time and conversion time
- The maximum sampling rate/frequency is limited by the minimum total sampling time
-\\[ f\_{sample(max)} = \frac{1}{t\_{acquisition(min)} + t\_{conversion(min)}} \\]
+\\[ f\_\text{sample(max)} = \frac{1}{t\_\text{acquisition(min)} + t\_\text{conversion(min)}} \\]
- We will learn more about the acquisition process and the conversion process soon
---
@@ -418,7 +418,7 @@
- This specifies the voltage which the input signal is compared to (e.g. 5V) and therefore signals larger than the reference voltage cannot be accurately converted
- Step size (V
step)
- This is the smallest signal that can be determined by the ADC and is a function of both the resolution and the reference voltage
-\\[ V\_{step} = \frac{V\_{ref}}{2^{resolution}} \\]
+\\[ V\_\text{step} = \frac{V\_\text{ref}}{2^\text{resolution}} \\]
---
@@ -530,7 +530,7 @@
- The acquisition time must be long enough to allow the sample and hold capacitor to charge
- This is dependent on the source impedance (R
signal) of the signal being measured
- The capacitor is fully charged after approximately 5 time constants (τ)
- \\[ \tau = (R\_{signal} + R\_{sample}) C\_{sample} \\]
+ \\[ \tau = (R\_\text{signal} + R\_\text{sample}) C\_\text{sample} \\]
- The conversion time is dependent on the resolution and the cycle time
- One cycle is required per bit of resolution
- Shorter cycle times will result in faster conversions, but the minimum cycle time will be limited by the ADC hardware capability, as well as the clock speed of the MCU
@@ -821,7 +821,7 @@
- It is measured in Least-Significant-Bits (LSB)
- Given that one LSB is equal one step size, we can determine how many volts the converted reading might differ from the actual value
-\\[ V\_{\text{Absolute Error}} = V\_{\text{step}} \times LSB\_{\text{Absolute Error}} \\]
+\\[ V\_{\text{Absolute Error}} = V\_{\text{step}} \times \mathtt{LSB}\_{\text{Absolute Error}} \\]
\\[ V\_{\text{ADC}} - V\_{\text{Absolute Error}} \leqslant V\_{\text{Actual}} \leqslant V\_{\text{ADC}} + V\_{\text{Absolute Error}} \\]
diff --git a/presentations/DigitalL4/presentation.html b/presentations/DigitalL4/presentation.html
index 460529e..c25f92f 100644
--- a/presentations/DigitalL4/presentation.html
+++ b/presentations/DigitalL4/presentation.html
@@ -266,7 +266,7 @@
- The gain of the passive RC filter, G
vf, is 1 in your design
- The analog signal at the ADC, V
vf, is therefore
-\\[ V\_{vf} = G\_{vs} G\_{vo} V\_{AC} + V\_{off} \\]
+\\[ V\_\text{vf} = G\_\text{vs} G\_\text{vo} V\_\text{AC} + V\_\text{off} \\]
---
@@ -283,7 +283,7 @@
- The gain of the passive RC filter, G
if, is 1 in your design
- The analog signal at the ADC, V
if, is therefore
-\\[ V\_{if} = G\_{is} G\_{io} I\_{L} + V\_{off} \\]
+\\[ V\_\text{if} = G\_\text{is} G\_\text{io} I\_\text{L} + V\_\text{off} \\]
---
@@ -291,14 +291,14 @@
# ADC Data Representing Voltage
-.center[
]
+.center[
]
- In this lecture, lets assume a 50Hz V
vf at ADC0 is sampled and converted to an ADC value every 2ms
- Note that project specifications limits maximum sampling rate to 10kHz and therefore if repeatedly a sample of V
vf is taken followed by a sample of V
if then each V
vf sample will be 0.2ms apart
- Alternatively V
vf can be continuously sampled over a few periods to take samples of V
vf every 0.1ms
- Need zero crossing detector to correctly align the V
if samples taken after this with the V
vf samples
- From the ADC data we can estimate the AC source voltage at i
th sample point since
-\\[ V\_{AC}[i] = \left( ADC0Value[i] \times 5/1024 - V\_{off} \right) / \left( G\_{vs} G\_{vo} \right) \\]
+\\[ V\_\text{AC}[i] = \tfrac {\mathtt{ADC0Value}[i] \times \frac{5}{1024} - V\_\text{off}} {G\_\text{vs} G\_\text{vo}} \\]
---
@@ -306,14 +306,14 @@
# ADC Data Representing Current
-.center[
]
+.center[
]
- Similar to V
vf lets assume a 50Hz V
if at ADC1 is sampled and converted to an ADC value every 2ms
- Project specifications limits maximum sampling rate to 10kHz and therefore if repeatedly a sample of V
vf is taken followed by a sample of V
if then each V
if sample will be 0.2ms apart
- Alternatively V
if can be continuously sampled over a few periods to take samples of V
if every 0.1ms
- Need zero crossing detector to correctly align the V
if samples with the V
vf samples
- From the ADC data we can estimate the AC load current at i
th sample point since
-\\[ I\_{L}[i] = \left( ADC1Value[i] \times 5/1024 - V\_{off} \right) / \left( G\_{is} G\_{io} \right) \\]
+\\[ I\_\text{L}[i] = \tfrac {\mathtt{ADC1Value}[i] \times \frac{5}{1024} - V\_\text{off}} {G\_\text{is} G\_\text{io}} \\]
---
name: S6
@@ -410,13 +410,13 @@
- [Recall](#S7) that we have already learnt how to obtain the peak of a signal
- Assuming this signal is sinusoidal, the peak value is related to the RMS value as given by
-\\[ RMS = \frac {Peak} {\sqrt{2}} \\]
+\\[ \text{RMS} = \frac {\text{Peak}} {\sqrt{2}} \\]
- The assumption of a sinusoidal signal is not always correct, especially in a practical design, as V
ac and I
L are often distorted sinusoidal signals
- The distortions in the signals lead to significant errors in the RMS estimate when using this method
- We can improve the accuracy by developing software to implement the RMS formula given by
-\\[ V\_{AC\_{rms}} = \sqrt {\frac {1} {T\_p} \int\_{0}^{T\_p} {V\_{AC}^2 dt}} \quad \text{OR} \quad I\_{L\_{rms}} = \sqrt {\frac {1} {T\_p} \int\_{0}^{T\_p} {I\_{L}^2 dt}}\\]
+\\[ V\_\text{AC(RMS)} = \sqrt {\frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {V\_\text{AC}^2 \,dt}} \quad \text{or} \quad I\_\text{L(RMS)} = \sqrt {\frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {I\_\text{L}^2 \,dt}}\\]
---
name: S11
@@ -446,7 +446,7 @@
- If we have taken N ADC samples at regular Δt
sample intervals over one time period of the signal, the time period T
p = NΔt
sample
- We can square each V
AC or I
L sample and use Riemann sum to numerically evaluate the RMS as given by
-\\[ V\_{AC\_{rms}}^2 = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} V\_{AC}^2[i] \Delta t\_{sample} \quad \text{OR} \quad I\_{L\_{rms}}^2 = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} I\_L^2[i] \Delta t\_{sample}\\]
+\\[ V\_\text{AC(RMS)}^2 = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} V\_\text{AC}^2[i] \cdot \Delta t\_\text{sample} \quad \text{or} \quad I\_\text{L(RMS)}^2 = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} I\_\text{L}^2[i] \cdot \Delta t\_\text{sample}\\]
---
@@ -505,13 +505,13 @@
- [Recall](#S10) that we have already learnt how to obtain the RMS of V
AC and I
L
- Assuming V
AC and I
L are sinusoidal, the power is related to their RMS values and the power factor angle as given by
-\\[ P = V\_{AC\_{rms}} I\_{L\_{rms}} cos(\theta) \\]
+\\[ P = V\_\text{AC(RMS)} I\_\text{L(RMS)} \cos(\theta) \\]
- The assumption of a sinusoidal signal is not always correct, especially in a practical design, as V
ac and I
L are often distorted sinusoidal signals
- The distortions in the signals lead to significant errors in the power estimate when using RMSs and the power factor angle
- We can improve the accuracy by developing software to implement the power formula given by
-\\[ P = \frac {1} {T\_p} \int\_{0}^{T\_p} {V\_{AC} I\_{L} dt} \\]
+\\[ P = \frac {1} {T\_\text{p}} \int\_{0}^{T\_\text{p}} {V\_\text{AC} I\_\text{L} \,dt} \\]
---
name: S15
@@ -523,7 +523,7 @@
- Samples of V
AC as well as I
L are at regular Δt
sample intervals
- We can multiply each V
AC sample with corresponding I
L sample to numerically evaluate power as given by
-\\[ P = \frac {1}{N \Delta t\_{sample}} \sum\_{i=0}^{N-1} V\_{AC}[i] I\_L[i] \Delta t\_{sample} = \frac {1}{N } \sum\_{i=0}^{N-1} V\_{AC}[i] I\_L[i]\\]
+\\[ P = \frac {1}{N \Delta t\_\text{sample}} \sum\_{i=0}^{N-1} \left( V\_\text{AC}[i] \cdot I\_\text{L}[i] \cdot \Delta t\_\text{sample} \right) = \frac {1}{N} \sum\_{i=0}^{N-1} \left( V\_\text{AC}[i]\cdot I\_\text{L}[i] \right)\\]
- Since the two ADC channels are sampled one after the other, there is a time delay between each sample of V
AC and its corresponding I
L sample
- This can lead to a significant error in power calculation in the form of a phase-shift
@@ -542,13 +542,13 @@
.left-column[
- The missing V
AC and I
L samples can be approximated using the average of the samples from either side (i.e. linear approximation)
-\\[ \bar{V}\_{AC}[i] = \left( V\_{AC}[i] + V\_{AC}[i+1] \right) / 2 \\]
-\\[ \bar{I}\_{L}[i] = \left( I\_{L}[i-1] + I\_{L}[i] \right) / 2 \\]
+\\[ \bar{V}\_\text{AC}[i] = \frac {V\_\text{AC}[i] + V\_\text{AC}[i+1]} {2} \\]
+\\[ \bar{I}\_\text{L}[i] = \frac {I\_\text{L}[i-1] + I\_\text{L}[i]} {2} \\]
- How can we estimate the 11
th sample of V
AC and the -1
th sample of I
L?
- Power can now be evaluated as given by
-\\[ P = \frac {1}{2N} \sum\_{i=0}^{N-1} \left[ V\_{AC}[i] \bar{I}\_L[i] + \bar{V}\_{AC}[i] I\_L[i] \right] \\]
+\\[ P = \frac {1}{2N} \sum\_{i=0}^{N-1} \left[ V\_\text{AC}[i] \cdot \bar{I}\_\text{L}[i] + \bar{V}\_\text{AC}[i] \cdot I\_\text{L}[i] \right] \\]
]
diff --git a/presentations/DigitalL5/presentation.html b/presentations/DigitalL5/presentation.html
index 3c4871f..6e7051c 100644
--- a/presentations/DigitalL5/presentation.html
+++ b/presentations/DigitalL5/presentation.html
@@ -258,8 +258,8 @@
- We also want to monitor activities, and want to determine for how long or how often they occur
- As an example consider having to measure how long a button is pressed for
- All microcontrollers have a notion of time based on its clock, as each clock period is a function of the system clock frequency
-\\[ T\_{system\\\_clk} = \frac{1}{f\_{system\\\_clk}} \\]
-- Timers are peripherals which enable us to convert the `\(T_{system\_clk}\)` either into actions in real time or to measure events in real time
+\\[ T\_\mathtt{system\\\_clk} = \frac{1}{f\_\mathtt{system\\\_clk}} \\]
+- Timers are peripherals which enable us to convert the `\(T_\mathtt{system\_clk}\)` either into actions in real time or to measure events in real time
---
@@ -268,7 +268,7 @@
# Timing Without Timer Peripherals
- The microcontroller processor also has a notion of time from the system clock since the duration of each execution cycle is also
-\\[ T\_{cpu\\\_clk} = \frac{1}{f\_{cpu\\\_clk}} \\]
+\\[ T\_\mathtt{cpu\\\_clk} = \frac{1}{f\_\mathtt{cpu\\\_clk}} \\]
- We could implement timing in software by using for example a 'dummy' block of code that uses up execution cycles
- This is at the expense of taking up the processor time
- We also need to know exactly how many clock cycles it took to execute the block of code used for timing
@@ -388,13 +388,13 @@
- Prescaler
- The clock divider which divides the system clock to create the timer clock
-\\[ f\_{timer\\\_clk} = \frac{f\_{system\\_clk}}{\text{Prescaler}} \\]
+\\[ f\_\mathtt{timer\\\_clk} = \frac{f\_\mathtt{system\\\_clk}}{\text{Prescaler}} \\]
- Bits
- The number of bits allocated to the count register
-\\[ 0 \leqslant \text{count} < 2^{bits} \\]
+\\[ 0 \leqslant \text{count} < 2^\text{bits} \\]
- Resolution
- This is the minimum time interval the timer can measure and is equal to one timer clock period
-\\[ \text{Resolution} = \frac{1}{f\_{timer\\_clk}} \\]
+\\[ \text{Resolution} = \frac{1}{f\_\mathtt{timer\\\_clk}} \\]
---
@@ -404,7 +404,7 @@
- Range
- This is the maximum time interval the timer can measure
-\\[ \text{Range} = \text{Resolution} \times \left( 2^{bits} - 1 \right) \\]
+\\[ \text{Range} = \text{Resolution} \times \left( 2^\text{bits} - 1 \right) \\]
- Top
- The count value at which the count is reset
- Top must be less than or equal to the maximum possible count value which can be stored with the available bits
@@ -720,7 +720,7 @@
- We often want to produce a periodically pulsating signals that has a fixed time period (T
p)
- The pulsating signal is high (logic 1) for a certain portion of T
p and this time is called the on-time (T
on)
- For the remainder of T
p the pulsating signal is low (logic 0) and this time is called the off-time (T
off)
-\\[ T\_{p} = T\_{on} + T\_{off} \\]
+\\[ T\_\text{p} = T\_\text{on} + T\_\text{off} \\]
- In many application we control the duration of T
on to control the “pulse width”
- These signals are known as pulse-width modulated (PWM) signals
@@ -735,7 +735,7 @@
- V
supply can be any voltage ranging from a few volts to thousands of volts
- Pulsating V
supply can be turned in to a DC signal by passing it through an analog low-pass filter
- The DC signal can be controlled using T
on/T
p, which is referred to as the duty-cycle (D)
-\\[ V\_{DC} = V\_{supply} \times T\_{on}/T\_{p} = D V\_{supply} \\]
+\\[ V\_\text{DC} = V\_\text{supply} \times \frac{T\_\text{on}}{T\_\text{p}} = D \cdot V\_\text{supply} \\]
---
name: S30
@@ -748,8 +748,8 @@
- We can use this property to set T
on of the PWM, by setting the output state of OCnA/OCnB to low when every time a compare match is achieved
- The output state of OCnA/OCnB can be configured to be set to high when the count value resets
- Since we have to add 1 when calculating periods, this results in a PWM output where
-\\[ T\_{p} = \text{Resolution} \times \left( \text{Top} + 1 \right) = \left( \text{Top} + 1 \right) / f\_{timer\\\_clk}\\]
-\\[ T\_{on} = \text{Resolution} \times \left( \text{Compare} + 1 \right) = \left( \text{Compare} + 1 \right) / f\_{timer\\\_clk}\\]
+\\[ T\_\text{p} = \text{Resolution} \times \left( \text{Top} + 1 \right) = \frac{\text{Top} + 1}{f\_\mathtt{timer\\\_clk}}\\]
+\\[ T\_\text{on} = \text{Resolution} \times \left( \text{Compare} + 1 \right) = \frac{\text{Compare} + 1}{f\_\mathtt{timer\\\_clk}}\\]
- The compare value can be changed between 0 and Top to change the duty-cycle between 0% and 100%
---