Table of Contents        Previous topic       Next topic       

The Extension Interface->General Purpose Interface Calls->SetAnalogOutputs

extern "C" void SetAnalogOutputs(LONG nExtensionState, BYTE nPortAddress, WORD AnalogOutputs[8], BYTE nHandledAnalogPins)

This is called when an on-chip analog output (such as from a DAC or a voltage reference) has been generated.  

Up to 8 analog signals can be output in this call.  Users should test the value nPortAddress to determine the source and then test the appropriate bits in nHandledAnalogPins to see which elements of AnalogOutputs are valid.

The output does not usually come out on a conventional 8051 port and so the values of nPortAddress and the allocation of bit positions to signals will have been decided by the author of the extension for the variant.  See the documentation for the variants that support this call for more information.