Im triying to simulate this sensor on proteus but LCD always shows -127, theres something extra i have to do?. I already mount the circuit and charged the program and it works, so the code is not the problem, theres a setting i have to use on proteus?
You might want to start by reading this "sticky" from the CCS (PIC Compiler) forums: http://www.ccsinfo.com/forum/viewtopic.php?t=47549 Proteus is notorious for not correctly emulating things (missing power supply lines, missing clocks etc. - you can spend more time trying to debug it than your actual problem. You are better off working with real hardware (especially with the cost of boards etc. these days).
I've never used a simulator, but I learnt before they were around - a good intuition is worth cultivating. Besides real circuits on a real PCB or breadboard are never quite what theory says they are. You have stray capacitance, inductance and coupling through supply connections to contend with in real life.