Page 104 of 346 Start Back Next End ZBasic System Library 92 ZBasic Microcontrollers DAC Type Subroutine Invocation DAC(channel, dacValue) DAC(channel, dacValue, stat) Parameter Method Type Description channel ByVal Byte The DAC channel to use. dacValue ByVal integral The desired DAC value (see discussion below). stat ByRef Boolean The variable to receive the status code. Discussion This routine creates an analog signal on the pin corresponding to the specified channel (see OpenDAC() for more information). Only the least significant 12 bits of the specified value are used and the resulting analog level will be approximately equal to dacValue divided by 4095 times the DAC reference voltage specified with OpenDAC(). Compatibility This subroutine is only available for xmega devices and is not available in BasicX compatibility mode. See Also CloseDAC, OpenDAC