GETAD
Action
Retrieves the analog value from channel 0-7.
Channel ranges from 0-11 on a 80517 or 80537.

Syntax
var = GETAD(channel, range)

Remarks

var The variable that is assigned with the A/D value
channel The channel to measure
range The internal range selection.

0 = 0-5 Volt
192 = 0 - 3.75 Volt
128 = 0 - 2.5 Volt
64 = 0 - 1.25 Volt
12 = 3.75 - 5 Volt
200 = 2.5 - 3.75 Volt
132 = 1.25 - 2.5 Volt
The GETAD() function is only intended for the 80515, 80535,80517, 80535 and 80552. For the 89Cc051 use GETAD2051().
It is a microprocessor dependent support feature.

See also

Example
Dim b1 as Byte, Channel as byte,ref as byte
channel=0 'input at P6.0
ref=0 'range from 0 to 5 Volt
b1=getad(channel,ref) 'place A/D into b1