Page 1 of 1
Working out Config words - esp. for other programmers.
Posted: Fri Apr 07, 2006 9:01 am
by Ian
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.
Posted: Sat Apr 08, 2006 9:41 pm
by Chet
I was wondering if any Flowcode users know how to set the programmer config setting in Flowcode to program directly to the chip using the Newfound Warp 13 programmer (PicStart Plus clone)?
Its a pain to have go through MPLAB to burn.
If not, could V3 support this?
Posted: Mon Apr 10, 2006 9:17 am
by Steve
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.
Posted: Tue Apr 11, 2006 5:17 am
by Chet
Steve, thanks for the link. I checked it out. Do you think I should be able to just use the same PICP congfig settings in Flowcode in the programmer setting. Or do I need to install the PICP software as a go between.
Chet
Posted: Tue Apr 11, 2006 8:41 am
by Steve
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).
Posted: Tue Sep 19, 2006 5:23 pm
by rvogel
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.
Posted: Tue Sep 19, 2006 5:36 pm
by Steve
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.
Posted: Tue Sep 19, 2006 10:11 pm
by rvogel
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?
Posted: Tue Sep 19, 2006 10:19 pm
by 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.
Posted: Thu Sep 21, 2006 9:40 am
by Steve
I think you need to call the "AddDefines" macro from within your program - this tells FlowCode that the component is being used and needs to be included in the compiled code.