Pico ADC-16


Top  Previous  Next


short int adc16_get_value (

       long far           * value,

       unsigned short int   port,

       short int            channel);


Once you open the driver, it constantly takes readings from the ADC-16.  When you call this routine, it immediately sets value to the most recent ADC reading for the specified channel.

If a reading is available, it returns TRUE, otherwise it returns FALSE. It will normally return FALSE for a few seconds after you open the driver, until the driver has taken a reading from the specified channel.


port specifies which serial port the ADC-16 is attached to.

channel should be 1 for channel 1, 2 for channel 2 and so on.