piclist 2008\07\01\110836a >
Thread: Strange PIC12F675 or user problem... pin cross-connect?
face picon face BY : email (remove spam text)(Olin Lathrop)

Rolf wrote:
> Two things... First, I am confused. I though newbies (like me) should
> download your development environment ...

No.  I have never suggested it as a starting point.  There is too much there
to learn beyond just the PIC and MPASM/MPLIB/MPLINK.  Once someone is
familiar with the PIC and tools, then they can possibly use my PIC
development environment.  I don't care if they do, but it's there for free
for anyone that wants to.

> Secondly, Explicitly writing BSF/BCF on RP0/RP1 *IS* encouraged.
> ...
> In fact, the datasheet
> (which you disagree with) explicitly recommends it in the ISR.

No, the data sheet doesn't recommend or encourage any particular style of
programming.  Occasionally small snippets of code are shown in the data
sheet to illustrate points.  These are not meant as good examples of
programming, and usually aren't.  They are usually just the bare minimum
instructions to perform whatever action they are describing.

> You have now suggested three different solutions to one problem. First
> you said I should do a clrf STATUS.

Yes, in the one specific case in the interrupt routine.  I couldn't fault
anyone for using BANKSEL there instead, which I even pointed out.

> Then you said I should always use banksels.

That is the absolutely safe approach everyone should start with.  Some may
never get beyond that.  That's OK.  BANKSEL is never wrong, only less
efficient than more advanced techniques like my macros that track the bank
setting at assembly time.

> Finally, you are suggesting I use your macros.

No, only making them available and sometimes referring to how they work.

However, BSF/BCF on RP0/RP1 is bad programming practise.  That's the one
thing you should definitely not do.

Look, you can do what you want.  I have no reason to care.  You can ignore
all the advice you get here.  My programs will still run fine.  However, I
don't want anyone else listening in to pick up bad habits and think that
direct manipulation of the bank bits is somehow acceptable programming

Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
<002e01c8db8c$a5c51480$0300a8c0@main> 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) Strange PIC12F675 or user problem... pin cross-connect?

month overview.

new search...