View previous topic :: View next topic |
Author |
Message |
Nick Guest
|
Configuration word |
Posted: Tue Jul 27, 2004 7:10 am |
|
|
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
|
|
Posted: Tue Jul 27, 2004 7:19 am |
|
|
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
|
|
Posted: Tue Jul 27, 2004 7:48 am |
|
|
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
|
|
Posted: Tue Jul 27, 2004 7:54 am |
|
|
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
|
don't think about any control on the special register |
Posted: Tue Jul 27, 2004 8:25 am |
|
|
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
|
|
Posted: Tue Jul 27, 2004 8:55 am |
|
|
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
|
|
Posted: Wed Jul 28, 2004 3:41 am |
|
|
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
|
|
Posted: Wed Jul 28, 2004 5:44 am |
|
|
I solved my problem with #fuses directive.
Thank you all for help.
Nick |
|
|
|