One thing I will say is that with the code from post #14 you need to rearrange the threshold levels
or the order of tests so that they go from the lowest value to the highest.

Right now the code is
Code:
trigger_thresshold_1   con 600  ; adc reading must fall below this to count  as a pressed button 1
trigger_thresshold_2   con 500  ; adc reading pressed button 2
trigger_thresshold_3   con 400  ; adc reading pressed button 3

if DataW <  trigger_thresshold_1 then
    b_level =1
elseif  DataW < trigger_thresshold_2 then
    b_level =2
else  DataW < trigger_thresshold_3   then
    b_level =3
endif
For that to work it needs to check from lowest value to highest value...
Code:
trigger_thresshold_1   con 400  ; adc reading must fall below this to count  as a pressed button 1
trigger_thresshold_2   con 500  ; adc reading pressed button 2
trigger_thresshold_3   con 600  ; adc reading pressed button 3
Otherwise everything will look like button 1