PCF8591 I2C _ADC read library for LPC11U24
Dependents: mbed_PCF8591_LPC11U24_ADC_RAJESH_NIELIT_CALICUT
Diff: PCF8591.h
- Revision:
- 0:3c4cd2f477ea
diff -r 000000000000 -r 3c4cd2f477ea PCF8591.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PCF8591.h Wed Jun 15 21:31:05 2016 +0000 @@ -0,0 +1,20 @@ + +#include "mbed.h" +#define PCF8591_ADDR 0x90 +#define ADC_CH00 0x00 +#define ADC_CH01 0x01 +#define ADC_CH02 0x02 +#define ADC_CH03 0x03 + +class PCF8591 { +public: + + PCF8591(I2C *i2c); + +uint8_t ADC_read(uint8_t); + +protected: + I2C *_i2c; //I2C bus reference + uint8_t _slaveAddress; //I2C Slave address of device + +};