Tutorial 25: Understanding the Analog Digital Converter

In the previous two tutorials I show you how to write the code to extract readings from analog sensors connected to a MCP3008. The way I communicate with the device and how I do the data processing was hand waved away quickly to expedite the tutorial. However you may want to understand what is really going on there, and that's why I created this tutorial.

Is this tutorial I show you what it is our code is doing and why we're doing the bitwise operators we wrote in our code. It's one thing to move forward and copy/paste what I'm doing into your project and it's another to understand why we're doing what we're doing.

This tutorial is a little older (published in 2015!). The main principles are still relevant, so I haven't needed to update this lesson.


DIFFICULTY
DIFFICULT
COMPUTER FAMILIARITY
NON-TRIVIAL
PYTHON PROGRAMMING
SOME
ABOUT
0
MINUTES
  • An introduction to the datasheet of a SPI device
  • What is actually going on when we send data to a MCP3008
  • How bitwise operators and binary works
  • How to configure raw data out of a MCP3008 such that we can understand it
No code is needed for this tutorial!
This tutorial reviews the MCP3008 datasheet. Find the download link below: