8-bit A/D and D/A converter
Revision 4:bdcb2b5c8cee, committed 2017-09-25
- Comitter:
- mcm
- Date:
- Mon Sep 25 10:57:07 2017 +0000
- Parent:
- 3:8d2e4b9015a8
- Commit message:
- DAC functionality was fixed to work properly.
Changed in this revision
PCF8591.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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 );