Rev.1.00 2007.11.1
REC10B0002-0100
87
4.2.5 A/D converter
__CreateADC
Synopsis <Set A/D converter>
Boolean __CreateADC(unsigned long data1, unsigned int data2, unsigned int
data3, void* func)
data1 Setup data 1
data2 Number of analog input pins used by A/D converter
data3 Setup data 3
func Callback function pointer
(Specify 0 if no callback functions are set.)
Description Sets the A/D converter to specified mode and operating condition.
[data1]
For data1, the following definition values can be set. To set multiple definition values at
the same time, use the symbol “|” to separate each specified value. Note, however,
that multiple analog input pin symbols cannot be specified at the same time.
RAPI_ONE_SHOT Selects one-shot mode.
RAPI_REPEAT Selects repeat mode.
RAPI_SINGLE_SWEEP Selects single sweep mode.
RAPI_REPEAT_SWEEP0 Selects repeat sweep mode 0.
RAPI_REPEAT_SWEEP1 Selects repeat sweep mode 1.
RAPI_AN0 Uses AN0 pin for the analog input pin.
RAPI_AN1 Uses AN1 pin for the analog input pin.
RAPI_AN2 Uses AN2 pin for the analog input pin.
RAPI_AN3 Uses AN3 pin for the analog input pin.
RAPI_AN4 Uses AN4 pin for the analog input pin.
RAPI_AN5 Uses AN5 pin for the analog input pin.
RAPI_AN6 Uses AN6 pin for the analog input pin.
RAPI_AN7 Uses AN7 pin for the analog input pin.
RAPI_AN00 Uses AN00 pin for the analog input pin.
RAPI_AN01 Uses AN01 pin for the analog input pin.
RAPI_AN02 Uses AN02 pin for the analog input pin.
RAPI_AN03 Uses AN03 pin for the analog input pin.
RAPI_AN04 Uses AN04 pin for the analog input pin.
RAPI_AN05 Uses AN05 pin for the analog input pin.
RAPI_AN06 Uses AN06 pin for the analog input pin.
RAPI_AN07 Uses AN07 pin for the analog input pin.
RAPI_AN20 Uses AN20 pin for the analog input pin.
RAPI_AN21 Uses AN21 pin for the analog input pin.
RAPI_AN22 Uses AN22 pin for the analog input pin.
RAPI_AN23 Uses AN23 pin for the analog input pin.
RAPI_AN24 Uses AN24 pin for the analog input pin.
RAPI_AN25 Uses AN25 pin for the analog input pin.
RAPI_AN26 Uses AN26 pin for the analog input pin.