Difference between revisions of "I2C DAC"
From BitWizard WIKI
Line 2: | Line 2: | ||
sudo i2cset -y 1 0x60 0x40 0xff 0xf0 i | sudo i2cset -y 1 0x60 0x40 0xff 0xf0 i | ||
^^ ^ < Voltage bits | ^^ ^ < Voltage bits | ||
+ | |||
+ | explanation of the arguments: | ||
+ | -y don't ask confirmation | ||
+ | 1 number of the I2C bus (0 on older raspberry pi's) | ||
+ | 0x60 address of the DAC, use 0x61 for the other DAC. | ||
+ | 0x40 configuration: normal. | ||
+ | 0xff high 8 bits of the value | ||
+ | 0xf0 lower four bits of the value (in the high nibble) |
Revision as of 13:50, 11 March 2014
Set a voltage:
sudo i2cset -y 1 0x60 0x40 0xff 0xf0 i ^^ ^ < Voltage bits
explanation of the arguments:
-y don't ask confirmation 1 number of the I2C bus (0 on older raspberry pi's) 0x60 address of the DAC, use 0x61 for the other DAC. 0x40 configuration: normal. 0xff high 8 bits of the value 0xf0 lower four bits of the value (in the high nibble)