Multiply by 10, then shift 1 left? -------------------------------------------------- From: "alan smith" Sent: Thursday, May 13, 2010 14:39 To: "Microcontroller discussion list - Public." Subject: [PIC] converting C to F > Processor is a 18F23K20 > > I've never had the requirement to do much math with a PIC, other than > simple divide by 2 or 4 (shifts), add and subtract > > So looking for a little help in implementing this > > temp_F = (temp_C * 9 / 5) + 32; > > The temp_C * 9 can be done with the MULLW instruction. Just not to sure > about the divide by 5 part? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist