On Tue, 27 Jun 2006 07:13:45 -0400, Olin Lathrop wrote: > James Newtons Massmind wrote: > > > I've been sucked into an old project with 16C54 and a 16C57 on > > board and the code is just... Well, lets just say Olin would > > probably be violently sick if he had to look at this. It was > > written then modified to hit a moving spec and then patched by at > > least two different people. Pure hell. > > > > ... > > > > Trying to figure out what is going on in this code is just beyond > > me. Bad thing have happened inside my brain as a result of trying. > > > > ... > > > > It isn't worth re-writing the old PIC code. > > > Are you sure? I just checked the ancient scrolls, and the 16C54 > only has 512 instructions. Starting with the spec and a clean slate > might be exactly the way to go to get to the end result more > quickly, economically, and with more confidence. Just trying to > understand the existing code alone would probably take as long or > longer than just creating new code to match the spec. I have to agree with Olin here. I've done dozens of these kinds of projects over the years and have found it's almost always best to toss the old stuff and start from scratch, especially in such a small device. The amount of time you'll spend (and pay for!) to basically reverse engineer the old code will more than easily cover writing a formal specification and re-write the code. Been there, done that too many times. There are exceptions but they are very few and far between in my experience. Matt Pobursky Maximum Performance Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist