DAC
 
 
 Bean DAC
 
D/A converter

Methods are user callable functions/subroutines that are means of controlling the bean functions.

Methods:

  • Enable - This method enables D/A converter bean.

      ANSIC prototype: byte Enable(void)
    • Return value:byte - Error code, possible codes:
      • ERR_OK - OK

  • Disable - This method disables D/A converter bean.

      ANSIC prototype: byte Disable(void)
    • Return value:byte - Error code, possible codes:
      • ERR_OK - OK

  • SetValue - This method sets values of all channels.

      ANSIC prototype: byte SetValue(void* Values)
    • Values:void* - Pointer to array that contains the data. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the D/A converter. See version specific information for the current CPU in General Info.
    • Return value:byte - Error code, possible codes:
      • ERR_OK - OK

  • SetValue8 - This method converts 8-bits values to actual format of the result mode and resolution, and sets values of all channels. That causes the user code independency on Result mode and resolution.

      ANSIC prototype: byte SetValue8(byte *Values)
    • Values: Pointer to byte - Pointer to array that contains the data. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the AD converter. See version specific information for the current CPU in General Info.
    • Return value:byte - Error code, possible codes:
      • ERR_OK - OK

  • SetValue16 - This method converts 16-bits values to actual format of the result mode and resolution, and sets values of all channels. That causes the user code independency on Result mode and resolution.

      ANSIC prototype: byte SetValue16(word *Values)
    • Values: Pointer to word - Pointer to array that contains the data. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the AD converter. See Version specific information for the current CPU in General Info.
    • Return value:byte - Error code, possible codes:
      • ERR_OK - OK

  • Methods for future derivatives.
    • SetChanValue - This method sets value of required channel.

        ANSIC prototype: byte SetChanValue(byte Channel,void* Value)
      • Channel:byte - Channel number. If it is set only one channel in the bean then this parameter is ignored.
      • Value:void* - Pointer to one value. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the AD convertor. See Version specific information for the current CPU in General Info.
      • Return value:byte - Error code, possible codes:
        • ERR_OK - OK
        • ERR_RANGE - Parameter "Channel" out of range

    • SetChanValue8 - This method converts 8 bits value to actual format of the result mode and the resolution, and sets the value of the required channel. The conversion of value format causes the user code independency on the result modes and resolutions.

        ANSIC prototype: byte SetChanValue8(byte Channel,byte Value)
      • Channel:byte - Channel number. If it is set only one channel in the bean then this parameter is ignored.
      • Value:byte - One value. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the AD convertor. See Version specific information for the current CPU in General Info.
      • Return value:byte - Error code, possible codes:
        • ERR_OK - OK
        • ERR_RANGE - Parameter "Channel" out of range

    • SetChanValue16 - This method converts 16 bits value to actual format of the result mode and the resolution, and sets the value of the required channel. The conversion of value format causes the user code independency on result modes and resolutions.

        ANSIC prototype: byte SetChanValue16(byte Channel,word Value)
      • Channel:byte - Channel number. If it is set only one channel in the bean then this parameter is ignored.
      • Value:word - One value. Data type is byte, word or int. It depends on supported modes, resolution, etc. of the AD convertor. See Version specific information for the current CPU in General Info.
      • Return value:byte - Error code, possible codes:
        • ERR_OK - OK
        • ERR_RANGE - Parameter "Channel" out of range


Note: Some methods can be implemented as macros.



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.