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

Revision:
0:80768ca5d5ff
Child:
1:1967c3f48465
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HY3116.h	Wed May 11 12:11:43 2016 +0000
@@ -0,0 +1,24 @@
+#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 
+{
+    protected:
+    public:
+    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);
+    int32_t readAdc(bool alreadyRead);
+    void init();
+    
+};
\ No newline at end of file