CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC16F629 Quirk??

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PIC16F629 Quirk??
PostPosted: Sat Feb 05, 2005 11:05 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Feb 05, 2005 11:38 pm     Reply with quote

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: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Feb 06, 2005 12:39 am     Reply with quote

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.

Thanks for the help! Everything's working now.

-Ben
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group