Jump to content
43oh

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)
 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...