piclist 2008\07\05\101103a >
Thread: Code packing
www.piclist.com/techref/microchip/devices.htm?key=pic
face picon face BY : Jinx email (remove spam text)



> Sure, but I bet there is a lot of common code between projects

Hmmm, no. Not really. I mean that, I thought long and hard. They're
all so very different, on everything from 10F to 18F, and they have
very little in common

Tell you what though. I've got the current project at a stage where
I'm happy to leave it for a short while and look into relocatable code.
Then I can assess it for myself and see whether I really would benefit
by switching

> How many times have you written a interrupt driven UART routine,
> set up timer 2 for periodic interrupts, or the same interrupt enter/exit
> code?

Hardly ever. I think we must work on quite different projects. It's most
uncommon for me to need modules that were used in other projects

> With relocatable mode these all go into separate modules so the local
> symbol names can't collide

Yes, I appreciate that, and I'm not defending absolute coding. Partly
because it works fine for me so from my POV there's nothing to be
defensive about

> Doesn't it bother you that assumptions about pin usage are scattered
> around the code?  Hasn't a project ever changed so that pin usage got
> reassigned. Then you had to go thru the TRIS and PORT initialization
> and analog peripheral disabling or setup, and all the rest of the code
> that touched a pin

Honestly truly - no. As I generally make and assemble the first prototype
PCB by hand, using even TQFP / TSOP / SMT, I think carefully about
pin usage beforehand. It seldom needs changing, and then only minorly

> Wouldn't it be nicer to symbolically define each pin once then have
> the rest of the code use those symbols?
>
> > and absolute code built with MPASM has never been a problem
>
> How would you know?  Problem as opposed to what?

Problem as opposed to the chip in situ doesn't work. And it always
does

<009e01c8dea8$e063d490$89aafea9@ivp1> 7bit

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Code packing

month overview.

new search...