"sergio masci" wrote: >> bits/prescaler value >> >> 0b00 1 >> 0b01 8 >> 0b10 64 >> 0b11 256 >> >> Is there a formula that would fit the data above? Looks like there should >> be, but I'm using a switch for now... >> >> Vitaliy > > > Is this what you meen? > > int prescaler[4] = {1, 8, 64, 256}; > > // where j = 0b00, 0b01, 0b10, 0b11 > x = prescaler[j]; Sergio, thanks! Funny I haven't thought about this, this technique is used elsewhere in the same code (HexToInt). Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist