Difference between revisions of "I2C DAC"
Jump to navigation
Jump to search
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= |
= General info = |
||
Based on the MCP4726 chip from Microchip.<br> |
Based on the MCP4726 chip from Microchip.<br> |
||
http://ww1.microchip.com/downloads/en/DeviceDoc/22272C.pdf <br> |
http://ww1.microchip.com/downloads/en/DeviceDoc/22272C.pdf <br> |
||
Line 6: | Line 6: | ||
1100 000 and 1100 001 '''OR'''<br> |
1100 000 and 1100 001 '''OR'''<br> |
||
1100 010 and 1100 011<br> |
1100 010 and 1100 011<br> |
||
You can order both versions. The addresses of your board can be found on the bottom side. |
|||
⚫ | |||
⚫ | |||
* Board outline: 25x25mm |
* Board outline: 25x25mm |
||
* Mounting hole diameter: 3mm |
* Mounting hole diameter: 3mm |
||
* Mounting hole pitch: 19x19mm (3mm from board edge) |
* Mounting hole pitch: 19x19mm (3mm from board edge) |
||
= |
= Using the board = |
||
Set a voltage: |
Set a voltage: |
||
sudo i2cset -y 1 0x60 0x40 0xff 0xf0 i |
sudo i2cset -y 1 0x60 0x40 0xff 0xf0 i |
||
Line 18: | Line 21: | ||
-y don't ask confirmation |
-y don't ask confirmation |
||
1 number of the I2C bus (0 on older raspberry pi's) |
1 number of the I2C bus (0 on older raspberry pi's) |
||
0x60 address of the DAC, use 0x61 for the other DAC. |
0x60 address of the DAC, use 0x61 (or 0x62 and 0x63) for the other DAC. |
||
0x40 configuration: normal. |
0x40 configuration: normal. |
||
0xff high 8 bits of the value |
0xff high 8 bits of the value |
Latest revision as of 12:08, 11 November 2015
General info
Based on the MCP4726 chip from Microchip.
http://ww1.microchip.com/downloads/en/DeviceDoc/22272C.pdf
I2C address:
1100 000 and 1100 001 OR
1100 010 and 1100 011
You can order both versions. The addresses of your board can be found on the bottom side.
Physical dimensions
- Board outline: 25x25mm
- Mounting hole diameter: 3mm
- Mounting hole pitch: 19x19mm (3mm from board edge)
Using the board
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 (or 0x62 and 0x63) 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)