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



William Chops" Westfield" wrote:
>>          dbankif adcon1
>>          movlw   b'00001000'
>>                  ; XX------  unimplemented
>>                  ; --0-----  use Vss for Vref-
>>                  ; ---0----  use Vdd for Vref+
>>                  ; ----1000  configure AN0-AN6 as analog, rest
>> digital
>
> But this has the problem of not using the per-cpu defines for bit
> values. The comments SAY what the programmer THINKS the bits are
> doing, but there's no "support" for that in the form of microchip-
> defined symbols.

This is true, but them I'm providing my code as a example, not asking others
to diagnose a problem for me.

The error I do occasionally make with this method is not getting the bits
wrong.  That's very unlikely since I'm looking at the manual page for the
register while writing the code.  Every once in a while I make a change to
the documented bits which are really comments and forget to make the
corresponding change to the real number above that gets loaded into the
register.  I am aware of this and try to double check myself, but maybe once
a year I still screw up.

However, it's still the best method I have found so far, and I think the
easiest for others to read assuming they trust me to have gotten the bits
right.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
<003e01c8e081$1a757f10$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) Code packing

month overview.

new search...