8-bit A/D and D/A converter
Diff: PCF8591.cpp
- Revision:
- 4:bdcb2b5c8cee
- Parent:
- 3:8d2e4b9015a8
--- a/PCF8591.cpp Sun Sep 24 20:00:55 2017 +0000 +++ b/PCF8591.cpp Mon Sep 25 10:57:07 2017 +0000 @@ -418,12 +418,10 @@ - // Update Control Byte - aux = i2c.write ( PCF8591_Addr, &cmd[0], 1 ); + // Update Control Byte and the DAC output + cmd[ 1 ] = myNewDACValue; + aux = i2c.write ( PCF8591_Addr, &cmd[0], 2 ); - // Update DAC output - cmd[ 1 ] = myNewDACValue; - aux = i2c.write ( PCF8591_Addr, &cmd[1], 1 );