80 of 323
ZBasic System Library 70 ZX Microcontroller Family 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 not available in BasicX compatibility mode nor is it available on ATmega-based ZX devices. See Also CloseDAC, OpenDAC