A library to interface to the MCP3208 SPI-based ADC from Microchip. This chip provides eight analogue inputs, providing converted 12-bit values via SPI.
Dependents: Nucleo_MCP3208_Test Nucleo_MCP3208_Ticker_Test BBMv2_eps ref_BBMv2_eps ... more
mcp3208.h
- Committer:
- Kemp
- Date:
- 2011-05-23
- Revision:
- 0:d37e8cb188c1
- Child:
- 1:316f86115221
File content as of revision 0:d37e8cb188c1:
#include "mbed.h" #ifndef MCP3208_H #define MCP3208_H class MCP3208 { public: MCP3208(SPI bus, PinName cs); ~MCP3208(); int read_input(int channel); private: DigitalOut m_cs; SPI m_bus; void select(); void deselect(); }; #endif