Simple driver for the 12-bit DAC DAC7311 from TI
Revision 1:5497575badba, committed 2012-10-23
- Comitter:
- macgyveremir
- Date:
- Tue Oct 23 19:07:26 2012 +0000
- Parent:
- 0:ca49770e05b5
- Commit message:
- Correct and working implementation. Can easily be generalized to family devices DACx311
Changed in this revision
DAC7311.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ca49770e05b5 -r 5497575badba DAC7311.cpp --- a/DAC7311.cpp Fri Oct 12 18:31:18 2012 +0000 +++ b/DAC7311.cpp Tue Oct 23 19:07:26 2012 +0000 @@ -5,6 +5,8 @@ this->mode = mode; spi->format (16, DAC7311_SPI_MODE); + wait_us (5); + *sync = 0; spi->write (mode | conf_data_12(value)); *sync = 1; @@ -15,7 +17,9 @@ this->value = value; spi->format (16, DAC7311_SPI_MODE); + wait_us (5); + *sync = 0; spi->write (mode | conf_data_12(value)); *sync = 1; -} \ No newline at end of file +}