Jump to content

Recommended Posts

The MCP3008 is an easily used 10bit, 8 channel, Serial Peripheral Interface (SPI) Analog to Digital Converter.  I created an  Energia library that can be found here and used to read any of the eight pins with a single call.  Conversion is done for voltages between 0 and 3.3 V, including on the CC3200, and results in a integer reading between 0 and 1023.  This library is for single ended operation only and uses hardware SPI.

 

An example is included that demonstrates reading from all 8 channels.

post-45284-0-82777700-1444706030_thumb.jpg

 

Tested with Energia 0101E0016 on the following LaunchPads
  * CC3200-LAUNCHXL Rev 4.1 (80 MHz) EMT
  * CC3200-LAUNCHXL Rev 4.1 (80 MHz)
  * MSP-EXP432P401R (48 MHz) EMT
  * MSP430F5529 Rev 1.5 (25 MHz)
  * MSP-EXP430FR5969 Rev 2.0 (16 MHz)
  * MSP-EXP430G2553 Rev 1.5 (16 MHz)
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×