ANSELD not cleared in initialization routine

2013-05-06
2013-05-30
  • Jim giordano
    Jim giordano
    2013-05-06

    I just found the cause of some weird problems I've been fighting for a week.   Being new to this whole thing, it didn't occur to me for a while where the problem came from.

    I'm using a pic16lf1938 40 pin chip with five ports.

    In the INITSYS routine automatically generated by GCBASIC, it clears ANSELA and ANSELB, but it does not clear ANSELD.
    I was getting lots of glitches on output port D, and manually inserting the line ANSELD = 0, cleared everything up.  Is there a document somewhere that says it's my responsibility to set this?