Given that the hardware was the main constraint, I modeled the problem (in Excel) and proved that the C compiler offered for the task could not generate the code required to produce the desired output from the PIC. Just out of curiosity, how did you manage to do that? I wouldn't expect even the best of compilers to well-documented enough to produce an accurate excel model... The project, which was really very small code footprint, could only in done in assembly. The smaller the program, the easier it is to outperform a compiler using assembler. The converse is also true: the larger the program, the more difficult it is to maintain that edge. Treating every line of a 50k line program with the discipline to maintain "full" optimization is a lot easier for a compiler than for a human... BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads