Well, if you want to use just one byte and can lose some resolution, divide by 12 - 500 would become a touch under 42 and 3000 would become 250. It's not a bad approximation. If my maths is right the worst case would be 510/12 = 42.5 = 1.2% if saved as 42. At 500 ohms saved as 42, (42 / 41.666667)*100 = 0.8% Either that or use two bytes - a high byte (256's) and a low byte (units) to get 100% integrity between the measured and the stored value. Divide the number by 256 - the quotient goes into result high byte, the remainder into result low byte Is the 500 to 3000 in ohms ? How are you arriving at the numbers ? An internal timing routine ? PWM ? Jinx > How can you store values greater than 255 in a pic16c84. I need to > measure a resistor by charging a capacitor through it. The value is > between 500 and 3000. How can i store this value when the registers > are only 8 bit. > > Thomas Thorsen