ltc1663.c File Reference
This module provides the primitve to send command to an LTC1663 DAC device connected on an I²C Bus. More...
Go to the source code of this file.
|int ||ltc1663_SendCommand (const char *device, unsigned char command, unsigned int value)|
This module provides the primitve to send command to an LTC1663 DAC device connected on an I²C Bus.
Linear LTC1663 DAC Support
- Cédric Gaudin (K-Team SA)
- Copyright (C) 2004 K-TEAM SA
- none discovered.
Definition in file ltc1663.c.
||const char *
This function send a command to change the output voltage of the LTC1663 DAC. The I²C address used should be one in the range [0x20..0x27] (depending on device) and NOT the SYNC address (0x7E).
|device ||A String containing the K-Net name of the LTC1663 device. |
|command ||Command Word (see LTC1663 documentation)|
Command Word Format:
- bit 0 SY
- 1 Allows update on Acknowledge of SYNC Address only
- 0 Update on Stop condition only (Power-On Default)
- bit 1 SD
- 1 Puts the device in power-down mode
- 0 Puts the device in standard operating mode (Power-On Default)
- bit 2 BG
- 1 Selects the internal badgap reference
- 0 Selects the supply as the reference (Power-On Default)
- bits 3-7 Not used
|value ||10-bit unsigned value [0..1023] |
- an error code:
- <0 error code
- 0 cannot open the K-Net device
- 1 DAC voltage has been changed successfully
Definition at line 60 of file ltc1663.c.
References KNET_BUS_ANY, knet_close(), knet_open(), KNET_ORDER_LITTLE, knet_set_order(), and knet_write16().
Referenced by kbot_SetProcVCore().