Library for working with the HYCON HY3116/8 24-bit weigh-scales ADC series.

HY3116.h

Committer:
seajayshore
Date:
2016-07-04
Revision:
5:3fdbe36e5057
Parent:
3:535ed9a0ce59
Child:
6:435b50250491

File content as of revision 5:3fdbe36e5057:

#include "mbed.h"

#define HY3116_ADDRESS 0xA0

#define SYS 0x00
#define ADC1 0x01
#define ADC2 0x02
#define ADC3 0x03
#define ADC4 0x04
#define ADO 0x05
#define RESET 0x06

/* Function Prototypes */
class HY3116 
{
public:
//    HY3116(PinName sda, PinName scl);
//    ~HY3116();
    void writeByte(uint8_t address, uint8_t subAddress, uint8_t data);
    void resetChip();
    void readBytes(uint8_t address, uint8_t subAddress, uint8_t byteNum, uint8_t* dest, bool alreadyRead);
    bool readAdc(int32_t *_adcReading);
    void init();
    
private:
//    I2C i2c;
    
};