ADC_start_read_10bit_nowait

Description

Start asynchronous read of most significant 10 bits of analog channel

This function is the first of three functions that must be used to perform the asynchronous equivalent of the synchronous 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

ADC_start_read_10bit_nowait(ubyte channel_id)

Library

LIB/adc_lib.bas

Usage

On entry:
channel_id is the id of the analog channel to read. This corresponds to the PIC pin labelled ANj where channel_id is the index j and is in the range 0 to 7 (inclusive)
e.g.	if channel_id is 0 then pin AN0 (pin 2 of the 16f876) is read
	if channel_id is 4 then pin AN4 (pin 7 of the 16f876) is read

see ADC configuration for a more detailed description

On exit:
There is no return value

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()