;File: adc42cal.a51
;Author: Eckart Hartmann Date:05/10/2003
 ; Development progress: Adc842.df
;
;AdcCal==========Starts a calibration conversion.
;C Function prototype: char AdcCal(char cType);
;Description of Function: Start a calibration by writing cType to ADCCON3.
;User interface: Set the bits in cType as desired.
;		See data sheet for meaning of individual bits.
;		Call AdcCal() to write cType to ADCCON3.
;		Activates gain callibration (GNCLD = 0).
;		Returns 1.
;Robustness:
;Side effects:
;
NAME ADCCAL
$NOMOD51
 $IC(..kei842.inc) ; Parameter passing registers for Keil .
 $IC(..kei842.dat) ; SFR definition for Keil .
;
public _AdcCal
;
?PR?_AdcCal?ADCCAL	SEGMENT CODE
	RSEG	?PR?_AdcCal?ADCCAL
;
_AdcCal:
	mov	ADCCON3,cP1l	;ADCCON3 = cType;
	anl	ADCCON3,#0bfh	;GNCLD = 0;
  	mov	cp1l,#1		;return 1;
	ret
;
;Function End==========================================================Function End
END

