1.41.4.3 DACC_ChannelDataWrite Function

C

void DACC_ChannelDataWrite(DACC_CHANNEL_NUM channel, uint16_t data)

Summary

Converts a Digital data to Analog value

Description

This function converts a Digital data to Analog value. The behavior of this function call will vary based on the mode selected within MHC.

Precondition

DACC_Initialize must have been called.

Parameters

Param Description
channel Points to DACC Channel
data Digital data to be converted to Analog value.

Returns

None

Example

char myData[COUNT] = {"0xff","0x3E","0x7A","0x3F"};//COUNT is user dependent
    
    for (uint8_t i = 0; i<4; i++)
    {
        DACC_ChannelDataWrite (DACC_CHANNEL_0, myData[i]);
    }

Remarks

This API should be used when TAG is enabled.