ltc1663.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define LTC1663_ADDR(x)   (0x20|(x&7))
#define LTC1663_SY   (1<<0)
#define LTC1663_SD   (1<<1)
#define LTC1663_BG   (1<<2)


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

Define Documentation

#define LTC1663_ADDR (  )     (0x20|(x&7))

LTC1663 have different IC address [0x20..0x27]

Definition at line 15 of file ltc1663.h.

#define LTC1663_BG   (1<<2)

Selects the power supply or the internal bandgap (+2.5V) as reference

Definition at line 27 of file ltc1663.h.

Referenced by kbot_SetProcVCore().

#define LTC1663_SD   (1<<1)

Enable or disable the power-down mode

Definition at line 21 of file ltc1663.h.

#define LTC1663_SY   (1<<0)

Selects the type of update

Definition at line 18 of file ltc1663.h.

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).

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().

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