Video: Analog To Digital Conversion On The ATmega328p

In this week’s video, we continue on where we left off last week with another in our series of videos where we discuss how to program for the ATmega328p processor. This week, [Jack] takes a look at the analog to digital converter and takes us through how to set things up and then how to perform a conversion using the potentiometer on the 3pi as the analog source. Playing with potentiometers isn’t the most interesting thing in the world, but after watching this video, you will be able to do things like take light readings using a cadmium sulfide cell, read the weight applied to a sensor, calculate the temperature from a resistor and a thermistor, or interface with an analog gyroscope.

If you have missed our previous videos, here are some links:
Part 1: Setting up the development environment
Part 2: Basic I/O
Part 3: Pulse Width Modulation

Stay tuned for next week’s* video where we will take a look at how to interface with the 3pi’s line sensors.

Video is after the break…

* HAD is in the process of moving our secret headquarters so next week’s video may come some time later than next week.


6 thoughts on “Video: Analog To Digital Conversion On The ATmega328p

    1. Check out my stuff in the comments I’ve written for it – a chorus/flanger. I got intelligible results using AnalogRead but manually using the registers to process while the ADC works vastly improves the quality.

Leave a Reply to The cageybeeCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.