ADC_service_nowait

Description

Service asynchronous read of analog channel (this function is called repeatedly between start and competion of async read)

This function is the second of three functions that must be used to perform the asynchronous equivalent of the synchronous ADC_read_8bit or ADC_read_10bit function.

See ADC_read_10bit for a more detailed discussion of reading the ADC as an 10 bit value and channel_id

Definition

ubyte ADC_service_nowait()

Library

LIB/adc_lib.bas

Usage

On entry:
There are no parameters
On exit:
Return 0 if the ADC read is not complete
Return 1 if the ADC read is complete or invalid

Example of use


	ADC_start_read_10bit_nowait(bit_id)

	while ADC_service_nowait() == 0 do
		task_wait 1
	done

	val = ADC_read_10bit_nowait(bit_id)