Working out Config words - esp. for other programmers.
-
- Posts: 110
- Joined: Thu Sep 29, 2005 10:53 am
- Location: Matrix Multimedia
- Been thanked: 1 time
- Contact:
Working out Config words - esp. for other programmers.
One handy tip is to use PPP to calculate the config words.
Use the Configure PIC option to open the PPP config screen.
Manually select the chip you want in advanced config mode.
If you have the simple config screen click on the Options button and uncheck 'use simple config'.
You can then change the parameters using the easier drop down option boxes. The corresponding config word(s) are displayed on the left near the bottom. You can then use these values to set the config word(s) in other programmers, or to embed it into your code.
The config words can be displayed in Hex, Binary or Decimal.
You can also edit these config words and they wil lcahnge the drop down boxes to match. This allows you to enter config words you have been given, or have read from a chip, to see what configuration settings they contain.
Use the Configure PIC option to open the PPP config screen.
Manually select the chip you want in advanced config mode.
If you have the simple config screen click on the Options button and uncheck 'use simple config'.
You can then change the parameters using the easier drop down option boxes. The corresponding config word(s) are displayed on the left near the bottom. You can then use these values to set the config word(s) in other programmers, or to embed it into your code.
The config words can be displayed in Hex, Binary or Decimal.
You can also edit these config words and they wil lcahnge the drop down boxes to match. This allows you to enter config words you have been given, or have read from a chip, to see what configuration settings they contain.
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Chet,
I had a quick search about this and found the following:
http://home.pacbell.net/theposts/picmic ... anual.html
It allows a command-line interface to PICstart Plus (and clones), which should work with FlowCode v2. If you have any success on this front, please let the forum know as it could be very useful for other users.
I had a quick search about this and found the following:
http://home.pacbell.net/theposts/picmic ... anual.html
It allows a command-line interface to PICstart Plus (and clones), which should work with FlowCode v2. If you have any success on this front, please let the forum know as it could be very useful for other users.
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Hi Chet,
FlowCode v2 does not allow you to embed configuration data into the generated HEX file (although you could use the "#defines" component to do this).
There may be a way of defining and sending the configuration data using the PICP command line, but I am not familiar with it.
I'd suggest using the "#defines" component and putting something like the following into it:
(this line gets passed directly to the MPASMWIN assembler. If you are using a 16F88, or another chip with 2 config words, please refer to the MPASM documentation).
Your command line for PICP in FlowCode's config options screen will probably be something like:
(FlowCode puts the name of the hex file at the end of this string).
FlowCode v2 does not allow you to embed configuration data into the generated HEX file (although you could use the "#defines" component to do this).
There may be a way of defining and sending the configuration data using the PICP command line, but I am not familiar with it.
I'd suggest using the "#defines" component and putting something like the following into it:
Code: Select all
asm __CONFIG H'3FFA'
Your command line for PICP in FlowCode's config options screen will probably be something like:
Code: Select all
C:\picp\picp.exe -c com1 %p -wp
I am using MicroPro to program my PICs from FlowCode and it is working good. Is there a way to set the configuration bits in FlowCode so I don't have to keep setting the fuses in MicroPro? By default it comes up with RC for the Oscillator which I then set to XT.
In the MPASM help file it has a topic covering "__config - Set Processor Configuration Bits". Does this apply here and how do I implement?
Thanks.
In the MPASM help file it has a topic covering "__config - Set Processor Configuration Bits". Does this apply here and how do I implement?
Thanks.
rvogel
- Steve
- Matrix Staff
- Posts: 3424
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
Yes, the same advice applies here. In v2 of FlowCode, use the "#defines" component and add an appropriate __CONFIG line as described above.
For those using v3 (which is not many yet because it is not quite ready for release!), the configuration data now gets stored in the FlowCode file and should transfer ok to the HEX file. The programmer should pick the info up from the HEX file, so you should not need to do anything.
For those using v3 (which is not many yet because it is not quite ready for release!), the configuration data now gets stored in the FlowCode file and should transfer ok to the HEX file. The programmer should pick the info up from the HEX file, so you should not need to do anything.
I have tried the #defines component with this code:
but it doesn't carry over to MicroPro and I don't see it in the asm file. What am I doing wrong?
Code: Select all
asm __CONFIG XT_OSC
rvogel
I just got it to work by inserting a C Code block at the beginning of the chart:
but it does not work with the #Defines component.
Sorry, I am a bit green with C. Most of my experience is in Visual Basic on a PC.
Is there anything wrong with doing it as pasted in C Code? How would I get it to work with #Defines?
Thanks.
Code: Select all
asm __CONFIG _XT_OSC
Sorry, I am a bit green with C. Most of my experience is in Visual Basic on a PC.
Is there anything wrong with doing it as pasted in C Code? How would I get it to work with #Defines?
Thanks.
rvogel