81 of 318
ZBasic System Library 71 ZX Microcontroller Family DACPin Type Subroutine Invocation DACPin(pin, dacValue, dacAccumulator) Parameter Method Type Description pin ByVal Byte The pin to which the DAC signal will be output. dacValue ByVal Byte The value representing the desired analog output. See the discussion below. dacAccumulator ByRef Byte A value used in the DAC process. See discussion below. Discussion This routine creates a digital approximation of an analog signal on the specified pin using a pseudo-PWM technique. ZBasic supports this routine for backward compatibility. New applications should use PutDAC() as it is more flexible. See the description of PutDAC() for more information. For ZX devices based on the ATxmega, a hardware DAC is available. In most applications requiring a DAC, using the hardware DAC will produce much better results. Resource Usage This routine disables interrupts for approximately 200µS during the generation process. See Also DAC, OpenDAC, PutDAC