![]() ZBasic System Library
95
ZBasic Microcontrollers
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 ZBasic 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
|