Resources
- Microcontrollers: From Assembly Language to C Using the PIC24 Family, chapter 11
- Pages 441-454, Data Conversion, seriously
- Microcontrollers: From Assembly Language to C Using the PIC24 Family, chapter 12
- Pages 533-546, Pulse Width Modulation, creatively
- Mississippi State ECE 3724 notes
- ADC & DAC (slides 1-3, 5, 6, 10, 16-18, 21, 22, 25)
- Times & PWM (slides 1, 2, 5, 8, 11, 12-14)
- PIC32 Family Reference Manual, Section 18. 10-bit Analog-to-Digital Converter (ACD)
Analog-to-Digital Conversion — ADC
Translate an analog value (encoded as a voltage level) to digital.
- ADC concepts (slides 1-3, 5, 10)
- Resolution: Smallest analog change that is detectable
- Precision: Number of levels that can be detected
- Range: Span over which levels can be detected
- Sampling period: Time it take to detect a level
- Output comparator (slide 16)
- Flash vs Ladder (slide 16-18, 21, 22, 25)
- Flash: O(1) time, 0(2n) space
- Ladder: O(n) time, 0(n) space
- Ladder in a spreadsheet
ADC on the PIC32
The is described in the Section 18 ot the PIC32 Family Reference Manuaal.
- Sets lots of control registers to start the conversion.
- Either get into a loop until
AD1CON1.DONE
is set or prepare to be interrupted. - Read the result from the appropriate buffer. There are 16 buffers!
ADC on I2C
Some systems, like the Raspberry Pi, do not have ADC converters. However, there are some I2C and SPI sensors.
The easy way: Analog with the Arduino
analogRead()
analogWrite()
pulseIn()
tone()
- How it does it
Getting ready for output
RC Filters
low-pass | high-pass | The equation |
---|---|---|
The 555
- LM555 datasheet
- Know your IC: 555 Timers
- The animation
- Altoid Tunes by Susan Reiser and Rebecca Bruce
The op amp
Much bigger stuff
Digital-to-Analog Conversion — DAC
Common controls
- LED brightness (slide 8)
- DC Motors (slide 11)
- Servos (slides 13-14)
- Pulse width measurement (slide 20)
- Using the PIC32 (slides 1, 2, and 5)