function A2D_Get(Channel: byte): tA2D_Result

Libraries ›› The A2D unit ›› Interface ››
Parent Previous Next

function A2D_Get(Channel: byte): tA2D_Result;

Select the given channel, activate the A/D converter and perform an acquisition and conversion then return the result, right justified.

The return format is always unsigned WORD or signed INTEGER, depending of the processor's A2D possibilities, but regardless of the initialized format (8-bit or full size).

If 8-bit is used, the result may be cast by the LO() pseudo function to avoid a byte truncation warning.