Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
PIC16F629 Quirk??
Posted: Sat Feb 05, 2005 11:05 pm
OK, I've set up my IRQ ISR to handle RA.. no problem... but RA0 and RA1 weak pullups aren't even on (even though I use port_a_pullups(true) and (0x0F)).
I've even soldered some pullups in place (10k) and still nothing happens when grounded like RA2 and RA3 both show.
Anyone notice quirks with the F629 like this?
-Ben
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Feb 05, 2005 11:38 pm
You have to disable the comparators by using this line of code:
setup_comparator(NC_NC_NC_NC);
Depending on your version of the compiler, that line of code may
not work. If that's the case, then you can turn them off manually
with this:
#byte CMCON=0x19
void main()
{
CMCON=7;
// Put the rest of your program here.
while(1);
}
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
Posted: Sun Feb 06, 2005 12:39 am
PCM programmer wrote:
You have to disable the comparators by using this line of code:
setup_comparator(NC_NC_NC_NC);
That's the right option listed in 12f629.h from CCS and work.
I looked at the register table and it's power on state is enabled. Yeesh! Subtle.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum