ltc1663.c File Reference

This module provides the primitve to send command to an LTC1663 DAC device connected on an IC Bus. More...

Include dependency graph for ltc1663.c:

Go to the source code of this file.

Functions

int ltc1663_SendCommand (const char *device, unsigned char command, unsigned int value)


Detailed Description

This module provides the primitve to send command to an LTC1663 DAC device connected on an IC Bus.

Linear LTC1663 DAC Support

Author:
Cdric Gaudin (K-Team SA)
Note:
Copyright (C) 2004 K-TEAM SA
Bug:
none discovered.
Todo:
nothing.

Definition in file ltc1663.c.


Function Documentation

int ltc1663_SendCommand ( const char *  device,
unsigned char  command,
unsigned int  value 
)

This function send a command to change the output voltage of the LTC1663 DAC. The IC address used should be one in the range [0x20..0x27] (depending on device) and NOT the SYNC address (0x7E).

Parameters:
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
Parameters:
value 10-bit unsigned value [0..1023]
Returns:
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().

Here is the call graph for this function:


Generated on Wed Dec 15 11:49:30 2010 for KoreBot Library by  doxygen 1.5.5