I need help with this(AD_RON)

hello, I need help with this :smiley: :smiley: , if somebody can say me that it means this AD_RON, I know what makes this code,… but what it means AD_RON :question: :question: :question:

main: adin ax4, 2, AD_RON, right_detect serout S_OUT,i57600,"Right ", dec right_detect,13] pause 500 goto main

AD_RON along with the following are all predefined constants for use with the ADIN command. There are others as well but they have similar meanings and are listed in the manual.

AD_LON = 0x02
AD_LPOS = 0x03
AD_LNEG = 0x08
AD_RON = 0x82
AD_RPOS = 0x83
AD_RNEG = 0x88

The third argument for the ADIN command is the ADSetup value. If you look at the datasheet for the 16F876 or 877 you will see what the ADSetup register bits mean and how they correlate to the above constants.

For example the conatants that start with AD_R mean the 10bit A/D value will be right justified inside the 16bit return value. Those that start with AD_L will cause the 10biot data to be left justified within the 16bit return value. Those with ON in them just mean the AD pins are used as normal AD. Those with POS or NEG mean the positive or negative VRef will be enabled as well.

Acidtech thank for help me in this :smiley: