Edson Brusque wrote: > I need to multiply a byte by another byte and then divide this result > by 255, like x = y * z / 255. > > At this moment, I'm using CCS-PICC built-in maths, but it's very > inneficient. The execution time for this calculation is about 1200 > instructions(!). Edson: If you divide by 256 instead of 255 (which takes ZERO code and ZERO time), half of your results will be exactly correct and the other half will only be off by 1. Is that close enough for your application? -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads