lib to set the address of the MCP4728
Dependents: MCP4728setaddrProg mbedSerialInterface_talkback2 MCP4728test mbedSerialInterface_sequencer
Diff: MCP4728setaddr.h
- Revision:
- 2:6ebeef601a90
- Parent:
- 1:1ba04e54bd3c
diff -r 1ba04e54bd3c -r 6ebeef601a90 MCP4728setaddr.h --- a/MCP4728setaddr.h Wed Dec 14 10:58:49 2016 +0000 +++ b/MCP4728setaddr.h Wed Jun 21 14:08:47 2017 +0000 @@ -17,6 +17,13 @@ int ldac0; public: + /* + sclcntpin : the pin physically connected to the I2C SCL line that counts the clock pulses ( via interrupt) + LDACpin pointer to the pin that change polarity after x SCL clock pulses to set the address (see data sheet) + i2cdevice : pointer to the I2C interface + Cntoutpin : this is to debug the count down interrupt. This toggles everty time the cnt down interrupt is called ( no function for the MPC4728) + ldac_invert : if this active the LDAC line is set from 1 to 0 + */ MPC4728_address_set(PinName sclcntpin, DigitalOut *LDACpin, I2CInterface* i2cdevice, DigitalOut *Cntoutpin , bool ldac_invert=false ); int getsclcnt( ){return sclcnt;} int readaddress(char& address, char& eepromaddr , char& regaddr );