Change wording
This commit is contained in:
@@ -20,6 +20,7 @@ I learned several things from this project:
|
|||||||
## Debouncing buttons
|
## Debouncing buttons
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
*image from Freenove tutorials*
|
*image from Freenove tutorials*
|
||||||
|
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ void checkButtonPressed(void) {
|
|||||||
Pulse Width Modulation (PWM) is essentially a way for digital circuits to pretend to be analog. Essentially, analog circuits can produce signals that have gentle sweeping curves, elegant waves, like God creating the feminine. Digital circuits can only produce on or off values - hard square shapes with sharp edges, like man chiseling facts into stone.
|
Pulse Width Modulation (PWM) is essentially a way for digital circuits to pretend to be analog. Essentially, analog circuits can produce signals that have gentle sweeping curves, elegant waves, like God creating the feminine. Digital circuits can only produce on or off values - hard square shapes with sharp edges, like man chiseling facts into stone.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
*image source [Klipsch Blog](https://www.klipsch.com/blog/digital-vs-analog-audio)*
|
*image source [Klipsch Blog](https://www.klipsch.com/blog/digital-vs-analog-audio)*
|
||||||
|
|
||||||
Basically pulse width modulation allows us to say that, over a given period of time T ("duty cycle"), we can use a digital value V with a precision of P bits, to express that for a given percentage of the duty cycle, the circuit should be ON (usually HIGH), while for the remainder of the duty cycle, it shouuld be OFF (normally LOW). For example:
|
Basically pulse width modulation allows us to say that, over a given period of time T ("duty cycle"), we can use a digital value V with a precision of P bits, to express that for a given percentage of the duty cycle, the circuit should be ON (usually HIGH), while for the remainder of the duty cycle, it shouuld be OFF (normally LOW). For example:
|
||||||
@@ -68,6 +70,7 @@ Basically pulse width modulation allows us to say that, over a given period of t
|
|||||||
... We can send a value of `(1 << 5)` to turn the signal HIGH for 50% of the duty cycle (approximately 500ms). Sending `(1 << 2)` would be approximately 25%, `(1 << 7)` approximately 75%, and `(1 << 9)` approximately 100%. This effectively varies the output voltage on the circuit according to a time series pattern that can make it seem like a wave, when in reality, we are just providing the same voltage for more or less of the time that the circuit is on.
|
... We can send a value of `(1 << 5)` to turn the signal HIGH for 50% of the duty cycle (approximately 500ms). Sending `(1 << 2)` would be approximately 25%, `(1 << 7)` approximately 75%, and `(1 << 9)` approximately 100%. This effectively varies the output voltage on the circuit according to a time series pattern that can make it seem like a wave, when in reality, we are just providing the same voltage for more or less of the time that the circuit is on.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
*image source Freenove tutorials*
|
*image source Freenove tutorials*
|
||||||
|
|
||||||
It's not *really* analog, because the voltage stays the same the entire time - an analog signal will oscilate from 0v to the height, then back down, and may even go negative to complete all 4 phases of the wave. But in many controls, it has a similar effect, and *feels* like analog.
|
It's not *really* analog, because the voltage stays the same the entire time - an analog signal will oscilate from 0v to the height, then back down, and may even go negative to complete all 4 phases of the wave. But in many controls, it has a similar effect, and *feels* like analog.
|
||||||
|
|||||||
Reference in New Issue
Block a user