View previous topic :: View next topic |
Author |
Message |
woz
Joined: 22 Mar 2005 Posts: 3
|
#fuses options definitions |
Posted: Tue Mar 22, 2005 7:38 pm |
|
|
Are the definitions for each of the #fuses options defined anywhere? I realize that the allowable options are listed in each devices .h file, but how does one work out what each option sets?
Thank you,
Ed |
|
|
bluetooth
Joined: 08 Jan 2005 Posts: 74
|
|
Posted: Tue Mar 22, 2005 7:53 pm |
|
|
1. Go to http://www.microchip.com
2. Look up the data sheet for the micro you're using
3. In the back of the data sheet you'll find a section (in pretty much all of them) called something like "Special Features of the CPU"
4. Your answer lies there! |
|
|
woz
Joined: 22 Mar 2005 Posts: 3
|
|
Posted: Thu Mar 24, 2005 8:19 pm |
|
|
Thank you fo the reply!
I went to the section of the data sheet you suggested and I was able to find some of the terms like LP and XT, but I could not find INTRC mentioned anywhere. I even did a search over the entire data sheet for INTRC and nothing was found. The chip I am using is PIC12F629. |
|
|
bluetooth
Joined: 08 Jan 2005 Posts: 74
|
|
Posted: Thu Mar 24, 2005 8:55 pm |
|
|
I'm guessing that the CCS INTRC corresponds to the 629's INTOSC bits...
INTRC should yield xxxxxxxxxx101 in config for I/O and CLKOUT, and INTRC_IO should yield xxxxxxxxxx100 in config for I/O on both oscillator pins.
You'll find the config value (fuses) at the end of the .LST file. Let us know how this turns out. |
|
|
Guest Guest
|
Fuse definitions, syntax, and usage |
Posted: Thu Mar 24, 2005 11:43 pm |
|
|
The CCS documentation regarding fuses really stinks. Many of the items in the header files for certain parts are undocumented.
Quote: | I'm guessing that the CCS INTRC corresponds to the 629's INTOSC bits... |
This guess is as good as any, but should we have to guess? |
|
|
bluetooth
Joined: 08 Jan 2005 Posts: 74
|
|
Posted: Fri Mar 25, 2005 5:24 am |
|
|
The reason I am "guessing" is that I haven't built a project with the 629.
CCS can call the fuses anything they want, and I would think they used INTRC to maintain consistency with other processors (or because it was easy!).
So, do you need someone to check this out for you? All you need to do is report back what should ALREADY be in YOUR list file.
Good luck.... |
|
|
Charlie U
Joined: 09 Sep 2003 Posts: 183 Location: Somewhere under water in the Great Lakes
|
|
Posted: Fri Mar 25, 2005 7:28 am |
|
|
We don't know which version of the compiler you are using, so I'll give a reply that applies to PCW or PCWH.
The fuses for each device are described by looking under View>Valid Fuses in the main menu. Then selecting the device of interest.
Another way is to use the device selector which is accessed with Tools>Device Selector from the main menu. Then select the device of interest. The fuses appear in a box in the upper right corner. There is both the bit and the mask that CCS uses to set or clear the bit.
These two tools and the device data sheet should make the fuses fairly clear.
If you are using the command line version, I hope that someone familiar with its operation will answer for us. |
|
|
bluetooth
Joined: 08 Jan 2005 Posts: 74
|
|
Posted: Fri Mar 25, 2005 7:48 am |
|
|
Charlie U wrote: |
These two tools and the device data sheet should make the fuses fairly clear.
|
Emphasis added - Agreed, read the data sheet over and over and over and over....
Also, with a little time to look at the device in the CCS Device Editor, INTRC and INTRC_IO give the values in my "guess".... I suppose you could send a request to CCS to change this to INTOSC (the Microchip name) for this part.
And, building a little test program for a '629, I found this at the end of the .LST file:
Code: |
Configuration Fuses:
Word 1: 39E5 INTRC NOWDT NOCPD NOPROTECT MCLR PUT BROWNOUT
|
You'll note that the bottom 3 bits are 101 - so you'd get CLKOUT and one I/O pin and the internal 4 MHz oscillator.
So, I think you should have the info you need now. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Fri Mar 25, 2005 8:41 am |
|
|
This is getting crazy....here they are so we can move on...
12F629 Fuses
CPD Data EEPROM Code Protected
NOCPD No EE protection
PROTECT Code protected from reads
NOPROTECT Code not protected from reading
NOMCLR Master Clear pin used for I/O
MCLR Master Clear pin enabled
PUT Power Up Timer
NOPUT No Power Up Timer
INTRC_IO Internal RC Osc, no CLKOUT
INTRC Internal RC Osc
RC_IO Resistor/Capacitor Osc
RC Resistor/Capacitor Osc with CLKOUT
BROWNOUT Reset when brownout detected
NOBROWNOUT No brownout reset |
|
|
woz
Joined: 22 Mar 2005 Posts: 3
|
|
Posted: Sat Mar 26, 2005 8:18 am |
|
|
Thanks guys.
dyeatman's response should take care of it for me. Just for the record, I am using PCM inside of MPLAB IDE. In that configuration the VIEW menu does not have a selection for FUSE settings. There is a pull down menu that allows you to set the configuration bits, but what is set in this menu does not match what gets programmed into the device, so that function must be incompatable with the CCS software.
I took a look at the .lst file and I could not see any statement concerning the FUSE settings. The only way I have of determing what the FUSE settings are is to program a part and read it with the programming software that came with the PIKit evaluation board that I am using.
It appears that I have the low end version of CCs's software, but for the price that I paid and with the help I am getting here I am quite satified so far.
Thank you again for your help! |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sat Mar 26, 2005 9:48 am |
|
|
woz wrote: | In that configuration the VIEW menu does not have a selection for FUSE settings. There is a pull down menu that allows you to set the configuration bits, but what is set in this menu does not match what gets programmed into the device, so that function must be incompatable with the CCS software. |
The fuse settings are the configuration words. This data is in the hex file if you use the CCS fuse statement. These values are set in the configuration bit in MPLAB. |
|
|
|