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

Configuration word

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







Configuration word
PostPosted: Tue Jul 27, 2004 7:10 am     Reply with quote

Hi,
I am writing a program for PIC12F629 and I haven't understand which
C instruction use to write the configuration word. I can set it only from IDE menu, but i want to write it with a C instruction because MPLAB IDE doesn't visualize GP3 flag.

Thanks,

Nick
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Tue Jul 27, 2004 7:19 am     Reply with quote

Look for #fuses in the help file and also look at the header file for the PIC you have selected.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Nick
Guest







PostPosted: Tue Jul 27, 2004 7:48 am     Reply with quote

I have already looked for in included files and help file and there aren't any references about configuration bits.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Jul 27, 2004 7:54 am     Reply with quote

The #fuse statement is used to set the configuration bits. By looking at the header file, you can see what options are available.
garyzheng



Joined: 22 Jul 2004
Posts: 25

View user's profile Send private message

don't think about any control on the special register
PostPosted: Tue Jul 27, 2004 8:25 am     Reply with quote

I think there is no way to control the special register and configuration bits in CCS compiler. All you can do is use its built-in function. The hearder file only include the parameter for built-in function and I/O port parameter:)
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Jul 27, 2004 8:55 am     Reply with quote

What do you want to do with the configuration word? Maybe if we know we can better help you.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Guest








PostPosted: Wed Jul 28, 2004 3:41 am     Reply with quote

My problem is that bit 5 of configuration word select MCLR pin function:
if bit is 1 pin function is MCLR else if bit is 0 pin function is the alternate function (so I think it means pin works as a classic I/O pin) and MCLR is internally disabled.

Thank you for help
Nick
Guest







PostPosted: Wed Jul 28, 2004 5:44 am     Reply with quote

I solved my problem with #fuses directive.
Thank you all for help.

Nick
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