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 CCS Technical Support

PIC10F pullups

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



Joined: 28 Sep 2008
Posts: 2

View user's profile Send private message

PIC10F pullups
PostPosted: Sun Sep 28, 2008 8:49 am     Reply with quote

I'm probably missing something basic here, but I can't seem to get the weak pullups enabled on the PIC10F206. I've tried the "port_x_pullups()" function, using everything I can think of for x( starting with b), but the compiler doesn't like it. I was going to do a #byte definition, but the OPTION register doesn't have an address.

Any ideas? Thanks for the help!

BitTwidler
Ttelmah
Guest







PostPosted: Sun Sep 28, 2008 9:17 am     Reply with quote

The 'option' register, is the register used to configure the watchdog prescaler, and pin change operation. Hence it is accessed through the 'setup_wdt', of 'setup_counters' operation. The pullups _default_ to 'on', if the bit is cleared, so there is only an option to disable them (look in the include file for the processor, and the data sheet). So:

setup_wdt(WDT_18MS);

Will also automatically enable the pull-ups. While:

setup_wdt(WDT_18MS|DISABLE_PULLUPS);

Will turn the pullups off.
Obviously choose your required timing for the watchdog.

Best Wishes
bittwidler



Joined: 28 Sep 2008
Posts: 2

View user's profile Send private message

PIC10F Pullups
PostPosted: Sun Sep 28, 2008 10:41 pm     Reply with quote

Thanks for the help Ttelmah!
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