Hi to all engineers, I am working on transducer that outputs 0-5v. center position outputs 2,5v so the range is 0 - 2,5"center" - 5v X or Y direction. The output is connected to pic ADC input and the problem I am having is called "dead band" witch means 2,5v may jump up or down so what we need to do is mask it that little change won't output ant thing. graphical way of explaining is: x+ direction 2,5v |-|--------------| 5v ^ dead band I added the dead band routine that checks if the ADC=2,5v it will output value 0 the problem with that is right after dead band I am getting 21 because of my dead band is 20. what I need is right after dead band start with 1 so what I did is "ADC - dead band" it took care of this problem but now I am having problem with high side not getting to 1023 because of "- dead band". another words right after dead band should start 1 and go all the way up to 1023. The way I see it I have to stretch the rest of data in order to get to 1023 but I am not sure how to do it. Should I use ADC * value ? I am not sure if I could explain clearly? any idea will appreciate. thanks Andre -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist