> I HATE! to read code that makes provision for every model of PIC ever
> created since the memory of man runneth not to the contrary! It makes
> the mind weary and the body tired.

You may come to appreciate this once you've done a few projects and
realize you want to reuse code between them. What/where have you seen
specifically that you are objecting to?

I do lot's of projects on lots of different PICs, and try to minimize
customization required for "standard" modules. Just today I ran into an
incompatibility between a 18F1320 and a 18F252. The code was running fine
on the 1320, but was not getting any A/D readings on the 252. This was
because only CCP2 starts an A/D conversion on a special event trigger on
the 252, but this is done with CCP1 on the 1320 because it only has one
CCP module. I left the old code in there and added IFDEF CCP2CON to
automatically assemble the appropriate initialization code in case it ever
gets moved back to a 1320. I had to do a similar IFDEF ADCON2 to
distinguish between the traditional and advanced A/D. The two have quite
different control bits.

You never know when in the future you might want to cut and paste code
from an old project.

> >You may come to appreciate this once you've done a few projects and
>realize you want to reuse code between them. What/where have you seen
>specifically that you are objecting to?

Most likely I will appreciate it, once I've done a few projects. And I am
not about to say whose code I am objecting to. If someone is gracious
enough to make their code available to look at, and learn from, I would
undergo torture before revealing names! (Well...some torture,
anyway...some mild torture...maybe having to listen to old Beatles songs.)

> >I left the old code in there and added IFDEF CCP2CON to
>automatically assemble the appropriate initialization code in case it ever
>gets moved back to a 1320. I had to do a similar IFDEF ADCON2 to
>distinguish between the traditional and advanced A/D.

All RIGHT!! Yeah, that solves my problem! I can write a little
pre-processor for the source code to filter out the useless stuff......Good
on ya' Olin! (Perl, here I come).

> Most likely I will appreciate it, once I've done a few projects. And I am
> not about to say whose code I am objecting to. If someone is gracious
> enough to make their code available to look at, and learn from, I would
> undergo torture before revealing names! (Well...some torture,
> anyway...some mild torture...maybe having to listen to old Beatles songs.)

No. I've glanced at some of that, and it seems straightforward
enough. I'm talking about really convoluted code, which uses a lot of
"else" statements to check the existence or non-existence of hex
numbers. IFDEF statements (or the generic equivalent) are easier to deal with.