Using PICkit2 with Flowcode
-
- Posts: 2
- Joined: Tue Jul 22, 2008 8:24 am
Re: Using PICkit2 with Flowcode
Brilliant thanks it works!!!! it's only take a week to get it going
Thanks again
Mike
Thanks again
Mike
-
- Posts: 94
- Joined: Wed Jul 16, 2008 4:39 pm
- Location: Philippines
- Been thanked: 1 time
- Contact:
Re: Using PICkit2 with Flowcode
Hello everyone,
I was able to get my PICKit2 going with flowcode based on your posts. I wanted to share with you my little discovery as a total idiot in PIC Programming...
If you want to get the config of your PIC, just do the following:
1. go to MPLAB IDE, Configure, select your device
2. go back to Configure, select Configuration bits
3. You can see the codes there!
4. If you want to change the settings, just unclick Configuration Bits set in code, change the settings manually and the codes will change too!
I'm sure this will help a lot of people who are too embarrassed to ask coz i searched everywhere and couldn't find anything that worked until I tried this technique.
I was able to get my PICKit2 going with flowcode based on your posts. I wanted to share with you my little discovery as a total idiot in PIC Programming...
If you want to get the config of your PIC, just do the following:
1. go to MPLAB IDE, Configure, select your device
2. go back to Configure, select Configuration bits
3. You can see the codes there!
4. If you want to change the settings, just unclick Configuration Bits set in code, change the settings manually and the codes will change too!
I'm sure this will help a lot of people who are too embarrassed to ask coz i searched everywhere and couldn't find anything that worked until I tried this technique.
-
- Posts: 94
- Joined: Wed Jul 16, 2008 4:39 pm
- Location: Philippines
- Been thanked: 1 time
- Contact:
Re: Using PICkit2 with Flowcode
S.O.S.!!!
I tried again my PICKit2 as programmer for flowcode using a PIC16f88. I configured it as follows:
0x2007,0x3ffb
0x2008,0x3fff
I get the following message:
Launching the programmer...
C:\Users\May\Desktop\pk2cmd_mtx\pk2cmd_mtx.exe -PPIC16F88 -F16F88A~2.hex -M -A5 -H
Return code = 34
This has been happening to me even with other PICs.
What's going on??
I tried again my PICKit2 as programmer for flowcode using a PIC16f88. I configured it as follows:
0x2007,0x3ffb
0x2008,0x3fff
I get the following message:
Launching the programmer...
C:\Users\May\Desktop\pk2cmd_mtx\pk2cmd_mtx.exe -PPIC16F88 -F16F88A~2.hex -M -A5 -H
Return code = 34
This has been happening to me even with other PICs.
What's going on??
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Here's an extract from the readme file for this programmer:
So it looks like your program is either not going in correctly, or the verification is failing. Note that verification will fail if the code protection configuration bits are set, even though the programming of the chip is successful.
If your program seems to work ok anyway, then I would ignore this message. Otherwise, it could be a problem with your hardware.
Code: Select all
Value Code Notes
----- ---- -----
0 OPSUCCESS Returned if all selected operations complete
successfully.
5 VOLTAGE_ERROR A Vdd and/or Vpp voltage error was detected.
This could be due to PICkit 2 being
improperly connected to a part, incorrect
part selection, or interference from other
circuitry on the target board.
7 OPFAILURE Returned if an operation fails and a more
specific error does not exist.
10 NO_PROGRAMMER The PK2CMD executable is unable to find a
connected PICkit 2 programmer.
11 WRONG_OS Returned if the OS firmware must be updated
before being used with this version of
PK2CMD.
15 FILE_OPEN_ERROR Returned if a file specified for reading to
(-gf...) cannot be opened for writing.
24 DEVICEFILE_ERROR The PK2CMD executable cannot find the device
file PK2DeviceFile.dat or the device file
may be corrupted.
28 UPDGRADE_ERROR Returned when an OS firmware upgade (-d...)
fails.
34 PGMVFY_ERROR Returned if a program or verify operation
fails.
36 INVALID_CMDLINE_ARG A syntax error in a command line argument
was detected, an invalid combination of
operations was entered, an invalid value was
entered, or a memory region was selected
that is not supported by the current device.
37 INVALID_HEXFILE Error opening or loading a specified hex
file (-f...).
If your program seems to work ok anyway, then I would ignore this message. Otherwise, it could be a problem with your hardware.
Re: Using PICkit2 with Flowcode
"Flowcode can now work seamlessly with Microchip's PICkit2 "
Hmm!!
I followed your instructions to the letter and got the following...
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic18.flowcode.exe -v -t PIC18F4455 "Flowcode5.c"
BoostC Optimizing C Compiler Version 6.70 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Licensed to FlowCode User under Single user Standard License for 1 node(s)
Limitations: PIC18 max code size:16384 bytes, max RAM banks:Unlimited, Non commercial use only
Flowcode5.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "C:\Documents and Settings\Damian\My Documents\Flowcode5.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC18F4455 -la -c2 -o Flowcode5.pp -v -d _BOOSTC -d _PIC18
Flowcode5.c success
success
....................
Return code = 0
Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostlink.pic.exe -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic18.lib flowcode.pic18.lib "Flowcode5.obj" -t PIC18F4455 -d "C:\Documents and Settings\Damian\My Documents" -p "Flowcode5"
BoostLink Optimizing Linker Version 6.70
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Building CASM file
Memory Usage Report
===================
RAM available:2048 bytes, used:7 bytes (0.4%), free:2041 bytes (99.6%),
Heap size:2041 bytes, Heap max single alloc:127 bytes
ROM available:24576 bytes, used:292 bytes (1.2%), free:24284 bytes (98.8%)
success
....................
Return code = 0
Launching the programmer...
C:\Program Files\PK2CMD_MTX\pk2cmd_mtx.exe -PPIC18F4455 -FFL84CF~1.hex -M -A5 -H
Hex file not found.
....................
Return code = 37
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.
FINISHED
Any thoughts??
Damian
Hmm!!
I followed your instructions to the letter and got the following...
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic18.flowcode.exe -v -t PIC18F4455 "Flowcode5.c"
BoostC Optimizing C Compiler Version 6.70 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Licensed to FlowCode User under Single user Standard License for 1 node(s)
Limitations: PIC18 max code size:16384 bytes, max RAM banks:Unlimited, Non commercial use only
Flowcode5.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "C:\Documents and Settings\Damian\My Documents\Flowcode5.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC18F4455 -la -c2 -o Flowcode5.pp -v -d _BOOSTC -d _PIC18
Flowcode5.c success
success
....................
Return code = 0
Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostlink.pic.exe -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic18.lib flowcode.pic18.lib "Flowcode5.obj" -t PIC18F4455 -d "C:\Documents and Settings\Damian\My Documents" -p "Flowcode5"
BoostLink Optimizing Linker Version 6.70
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Building CASM file
Memory Usage Report
===================
RAM available:2048 bytes, used:7 bytes (0.4%), free:2041 bytes (99.6%),
Heap size:2041 bytes, Heap max single alloc:127 bytes
ROM available:24576 bytes, used:292 bytes (1.2%), free:24284 bytes (98.8%)
success
....................
Return code = 0
Launching the programmer...
C:\Program Files\PK2CMD_MTX\pk2cmd_mtx.exe -PPIC18F4455 -FFL84CF~1.hex -M -A5 -H
Hex file not found.
....................
Return code = 37
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.
FINISHED
Any thoughts??
Damian
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
The parameter for the hex file looks wrong to me. The exact parameter line for the programmer should be:
Code: Select all
-PPIC%p -F%F.hex -M -A5 -H
Re: Using PICkit2 with Flowcode
34 PGMVFY_ERROR Returned if a program or verify operation fails.
I get the same answer.
return code = 34
I have the same pic 16F88
But it would be nice if everything worked as it should.
I have follow this thread and made as written.
I know that my pickit2 is ok.
Could it be something I have missed or nothing can be done about this with "RETURN CODE = 34"
Foppa
I get the same answer.
return code = 34
I have the same pic 16F88
But it would be nice if everything worked as it should.
I have follow this thread and made as written.
I know that my pickit2 is ok.
Could it be something I have missed or nothing can be done about this with "RETURN CODE = 34"
Foppa
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Using PICkit2 with Flowcode
I get exactly same error as post by DamianR on Sat Nov 15, 2008 5:58 pm i.e error 37.
Using Flowcode 3.4.7.48, Windows xp service pack2.
Program Parameters is: -PPIC%p -F%F.hex -M -A5 -H
Config options is un-ticked.
What I did notice is name of hex file picked up by 2nd phase process (after hex file generated) is a totaly different name from real file name.
here is log file generated:
Since the ~1 appeared in the file name (remembering old dos did this if similar name is over 6 charaters A ~1 , ~2 ), I shortened the file name to just 16F737k
And Success!
So if you get error 37, name of file could be too long.
Using Flowcode 3.4.7.48, Windows xp service pack2.
Program Parameters is: -PPIC%p -F%F.hex -M -A5 -H
Config options is un-ticked.
What I did notice is name of hex file picked up by 2nd phase process (after hex file generated) is a totaly different name from real file name.
here is log file generated:
Code: Select all
File name: C:\PWM Control\ADC Controlled PWM 16F737k.c
Generated by: Flowcode v3.4.7.48
Date: Friday, February 06, 2009 13:22:44
Licence: Professional
Registered to: Removed for privacy.
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F737 "ADC Controlled PWM 16F737k.c"
BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
ADC Controlled PWM 16F737k.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "C:\PWM Control\ADC Controlled PWM 16F737k.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC16F737 -la -c2 -o "ADC Controlled PWM 16F737k.pp" -v -d _BOOSTC -d _PIC16
..............
C:\PWM Control\ADC Controlled PWM 16F737k.c(1229:13): warning: expression was optimized out
C:\PWM Control\ADC Controlled PWM 16F737k.c(1367:13): warning: expression was optimized out
C:\PWM Control\ADC Controlled PWM 16F737k.c(1612:13): warning: expression was optimized out
C:\PWM Control\ADC Controlled PWM 16F737k.c(1750:13): warning: expression was optimized out
ADC Controlled PWM 16F737k.c success
success
.....
Return code = 0
Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostlink.pic.exe -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "ADC Controlled PWM 16F737k.obj" -t PIC16F737 -d "C:\PWM Control" -p "ADC Controlled PWM 16F737k"
BoostLink Optimizing Linker Version 6.70
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Warning unreferenced functions removed:
FCM_Fan1 in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_PWM0_ChangePeriod in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_ADC0_ReadAsInt in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_ADC1_ReadAsInt in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_ADC2_ReadAsInt in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_ADC3_ReadAsInt in: C:\PWM Control\ADC Controlled PWM 16F737k.c
FCD_ADC4_ReadAsInt in: C:\PWM Control\ADC Controlled PWM 16F737k.c
Building CASM file
Memory Usage Report
===================
RAM available:368 bytes, used:33 bytes (9.0%), free:335 bytes (91.0%),
Heap size:335 bytes, Heap max single alloc:110 bytes
ROM available:4096 words, used:1147 words (28.1%), free:2949 words (71.9%)
success
.....................
Return code = 0
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V3\tools\PICkit2\pk2cmd_mtx.exe -PPIC16F737 -FAD70F3~1.hex -M -A5 -H
Hex file not found.
....................
Return code = 37
Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.
FINISHED
And Success!
So if you get error 37, name of file could be too long.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Using PICkit2 with Flowcode
Hi Medelec
Thanks for the confirmed problem spot and also the workaround you posted.
Could you tell us if your using Vista or XP as your OS?
Also maybe you could try downloading the new Flowcode PIC V3.6.11 and see if the problem still exists when using Flowcode projects with long file names. Fingers crossed this has now all been fixed.
Thanks for the confirmed problem spot and also the workaround you posted.
Could you tell us if your using Vista or XP as your OS?
Also maybe you could try downloading the new Flowcode PIC V3.6.11 and see if the problem still exists when using Flowcode projects with long file names. Fingers crossed this has now all been fixed.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Using PICkit2 with Flowcode
Sorry should have been more clearermedelec35 wrote:I get exactly same error as post by DamianR on Sat Nov 15, 2008 5:58 pm i.e error 37.
Using Flowcode 3.4.7.48, xp service pack2.
.
Windows xp service pack 2
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Using PICkit2 with Flowcode
Flowcode 3.6.11.53 does not support long file names with PICkit 2.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Using PICkit2 with Flowcode
Thanks Medelec
Ok we will look into this problem. Thanks for getting back to me.
Ok we will look into this problem. Thanks for getting back to me.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Please try something like the following in the "programmer parameters" entry:
or
There may be a problem with names that have a space in them. Please let us know if it works for you.
Code: Select all
-PPIC%p -F%f.hex -M -A5 -H
Code: Select all
-PPIC%p -F"%f.hex" -M -A5 -H
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Using PICkit2 with Flowcode
Good news!
Well done for finding a quick soultion!
steve wrote:Please try something like the following in the "programmer parameters" entry:
This works!Code: Select all
-PPIC%p -F%f.hex -M -A5 -H
or
This also works!Code: Select all
-PPIC%p -F"%f.hex" -M -A5 -H
There may be a problem with names that have a space in them. Please let us know if it works for you
You are spot on!
Well done for finding a quick soultion!
Martin
Re: Using PICkit2 with Flowcode
Electronics and Practical Electronics http://www.epemag3.com have a special offer at moment where you can buy a PICkit programmer with a 887 PIC on a development PCB all for Β£10. You have to buy the magazine to get the offer. The PCB alone is worth more. Offer may close soon.
Re: Using PICkit2 with Flowcode
Hi. I had trouble getting this to work. Here are the settings I ended up with, may be it will help some one.
ο»ΏPICkit 2 Configurations etc - Target - 16F887 March 2009
Chip - Complier options
These should be set automatically if you install Flowcode 3.6.11 and above with PICkit 2 option
selected.
Complier:-
Location: C:\...\Flowcode V3\BoostC\boost.pic16.flowcode.exe
Parameters: -v -t PIC%p "%f.c"
Linker/Assembler:-
Location: C:\...\Flowcode V3\BoostC\boostlink.pic.exe
Parameters: -ld "C:\...\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "%f.obj" -t
PIC%p -d "%d" -p "f%"
Programmer:-
Location: C:\...\Flowcode V3\tools\PICkit2\pk2cmd_mtx.exe
Parameters: -PPIC%p -F%F.hex -M -A5 -H
Configuration options (default is ticked)
Location: C:\...\Matrix Multimedia\Common\PPPv3\PPPv3.exe
Parameters: -cs 2 -chip PIC%p -config
Chip - Configure
Open MPLAB, Click on Project - Open and select a project that was provided with the PICkit 2. ie. A
program that will run OK.
Click on Configure - Configuration Bits and note the values at address 2007 & 2008.
These are:- 2007 20C4
2008 3EFF (On mine)
Go Back to Flowcode and click on Chip - Configure. This will open a PPP widow.
Click β€Switch To Expert Config Screenβ€ button, to open a more detailed screen.
Select the correct chip, 16F887, in the top right hand drop down list.
Click on the Configuration Word(s), Config1 button and a box will appear allowing you to enter the
code for address 2007. Repeat for Config2 button and address 2008.
Programs should now download from Flowcode and run!
Note:- 1. While compiling to the chip, the gubberish before β€PICkit2 Program Reportβ€ of Squares
and slashes is normal!
2. The β€PICkit 2 programmerβ€ can have the latest OS Firmware version loaded (2.32.00)
ο»ΏPICkit 2 Configurations etc - Target - 16F887 March 2009
Chip - Complier options
These should be set automatically if you install Flowcode 3.6.11 and above with PICkit 2 option
selected.
Complier:-
Location: C:\...\Flowcode V3\BoostC\boost.pic16.flowcode.exe
Parameters: -v -t PIC%p "%f.c"
Linker/Assembler:-
Location: C:\...\Flowcode V3\BoostC\boostlink.pic.exe
Parameters: -ld "C:\...\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "%f.obj" -t
PIC%p -d "%d" -p "f%"
Programmer:-
Location: C:\...\Flowcode V3\tools\PICkit2\pk2cmd_mtx.exe
Parameters: -PPIC%p -F%F.hex -M -A5 -H
Configuration options (default is ticked)
Location: C:\...\Matrix Multimedia\Common\PPPv3\PPPv3.exe
Parameters: -cs 2 -chip PIC%p -config
Chip - Configure
Open MPLAB, Click on Project - Open and select a project that was provided with the PICkit 2. ie. A
program that will run OK.
Click on Configure - Configuration Bits and note the values at address 2007 & 2008.
These are:- 2007 20C4
2008 3EFF (On mine)
Go Back to Flowcode and click on Chip - Configure. This will open a PPP widow.
Click β€Switch To Expert Config Screenβ€ button, to open a more detailed screen.
Select the correct chip, 16F887, in the top right hand drop down list.
Click on the Configuration Word(s), Config1 button and a box will appear allowing you to enter the
code for address 2007. Repeat for Config2 button and address 2008.
Programs should now download from Flowcode and run!
Note:- 1. While compiling to the chip, the gubberish before β€PICkit2 Program Reportβ€ of Squares
and slashes is normal!
2. The β€PICkit 2 programmerβ€ can have the latest OS Firmware version loaded (2.32.00)
Re: Using PICkit2 with Flowcode
Hi,
I just bought a PICkit 2 with 4 ZIF different sockets for programming various chips. Thought it would be convenient to be able to program in a single push of a button.
I saw that Steve said he edited the PK2CMD to get it to work, I think it was in 2007.
Any chance the latest version 1.20 (2009 date on the file so about 18 months newer if I remember correct) could get any necessary changes done to get it to work? I have original working from the most basic test with the currently available release by Steve. Some of the notes in newer versions state bug fixes, including checksum fixes and others.
In order to set the configuration bits in flowcode/PICkit 2 do we need to keep the Compiler Options window "Check box - checked" for use external program to set configuration options.
Thanks
Ron
I just bought a PICkit 2 with 4 ZIF different sockets for programming various chips. Thought it would be convenient to be able to program in a single push of a button.
I saw that Steve said he edited the PK2CMD to get it to work, I think it was in 2007.
Any chance the latest version 1.20 (2009 date on the file so about 18 months newer if I remember correct) could get any necessary changes done to get it to work? I have original working from the most basic test with the currently available release by Steve. Some of the notes in newer versions state bug fixes, including checksum fixes and others.
In order to set the configuration bits in flowcode/PICkit 2 do we need to keep the Compiler Options window "Check box - checked" for use external program to set configuration options.
Thanks
Ron
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Sorry Ron, but I'm really busy finalising the release of Flowcode V4 at the moment. Once this has been done, I'll try to locate the source code for the updated PICkit programmer and edit this as appropriate so it includes the necessary additions that are required for it to operate better with Flowcode.
If you are using the latest version of Flowcode, you can use that option and select our PPP software to create the configuration data for you.
If you are using the latest version of Flowcode, you can use that option and select our PPP software to create the configuration data for you.
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Hi Ron,
Please excuse my hasty post just now. I've had a quick look at the new version of the command line programmer and it looks to have implemented the fixes that I added tot he pk2cmd_mtx.exe program anyway. This means there is no need for me to continue to maintain a separate version of the PICkit programmer (great news for me!).
For the record, the 2 additions I made were as follows:
(2) has been solved because the latest version of the program implements this feature as -T.
I've not had the chance to test this yet, but I suspect that the following parameters line would be needed with the latest v1.2 PK2CMD.EXE:
(where <path> is the full path to the pk2cmd.exe file).
I hope this solves this issue for you.
Please excuse my hasty post just now. I've had a quick look at the new version of the command line programmer and it looks to have implemented the fixes that I added tot he pk2cmd_mtx.exe program anyway. This means there is no need for me to continue to maintain a separate version of the PICkit programmer (great news for me!).
For the record, the 2 additions I made were as follows:
(1) has been solved by the addition of the -B parameter, which allows you to add the path to the dat file without needing to add the path to the PATH environment variable in Windows.1) The directory of the pk2cmd_mtx.exe is now inspected when
searching for the <PK2DeviceFile.dat> file. If it is not
there, a complete search of the user's PATH is performed.
The original pk2cmd.exe release only searched the PATH which
meant that either the exe's directory had to be added to
the path, or the tool had to be launched while the exe's
directory was the current working directory.
2) Added a new command-line switch "-H", which holds a voltage
on the target device once the exe has completed execution.
This is useful for using PICkit2 with boards that can be
powered from the PICkit2 device.
The original pk2cmd.exe release always reset the voltage
on the target once programming is completed, which meant
that an external power source was always required for the
target board.
(2) has been solved because the latest version of the program implements this feature as -T.
I've not had the chance to test this yet, but I suspect that the following parameters line would be needed with the latest v1.2 PK2CMD.EXE:
Code: Select all
-PPIC%p -F%F.hex -M -A5 -T -B<path>
I hope this solves this issue for you.
Re: Using PICkit2 with Flowcode
PICkit 2 CMD V1.2 WORKS, based on using the PICkit V2.61 windows programming software as one step of verification. Programmer visually behaves like i expect it to, Flowcode reports success, and when I verify the hex file (using PICkit2 V2.61 Programming software), with what was programmed on the 16F via flowcode it comes out successful as wellI
1) Unzip the pickit2cmdv1-20.zip file in the tools folder in flowcode file structure.
2) Replace the original (CHIP - Compiler Options window) programmer options with the following
Programmer Location
C:\Program Files\Matrix Multimedia\Flowcode V3\tools\PK2CMDv1-20\pk2cmd.exe
Parameters
-PPIC%p -F%F.hex -M -A5 -T -BC:\Program Files\Matrix Multimedia\Flowcode V3\tools\PK2CMDv1-20\
Done....... Should work....
I am very excited about V4. Is there a list of improvements and new features yet for V4?
How much is the upgrade from V3, I am hoping I can afford it?
I had a few V4 requests back when I started, can you tell me if any of them got implemented?
1) Ability to manually place logic blocks and connect destination lines.
2) Storing all pic/compiler related information in flowcode project file. Config bits, processor speed, all compiler options (bootloader I use requires special switch to be added in the compiler options, sometimes I use bootloader, sometimes I do not, easy to forget to put in/takeout this custom switch).
-rb 0x003 -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f"
3) Variable list default to always alphabetized, instead of having to click column header every time you open variable window. Clicking header would then simply toggle it ascending/descending.
4) Lockable user macros, others can use but not break them (like your component macors).
5) Ability to make calculation block larger/longer. Since there is issues with comments overlapping other logic in some cases I simply started using calc blocks to enter my comments. Would be nice to be able to stretch the calc block so more area is viewable at one time.
Thanks Steve, this is great that we can use the latest PICkit CMD software.
Ron
1) Unzip the pickit2cmdv1-20.zip file in the tools folder in flowcode file structure.
2) Replace the original (CHIP - Compiler Options window) programmer options with the following
Programmer Location
C:\Program Files\Matrix Multimedia\Flowcode V3\tools\PK2CMDv1-20\pk2cmd.exe
Parameters
-PPIC%p -F%F.hex -M -A5 -T -BC:\Program Files\Matrix Multimedia\Flowcode V3\tools\PK2CMDv1-20\
Done....... Should work....
I am very excited about V4. Is there a list of improvements and new features yet for V4?
How much is the upgrade from V3, I am hoping I can afford it?
I had a few V4 requests back when I started, can you tell me if any of them got implemented?
1) Ability to manually place logic blocks and connect destination lines.
2) Storing all pic/compiler related information in flowcode project file. Config bits, processor speed, all compiler options (bootloader I use requires special switch to be added in the compiler options, sometimes I use bootloader, sometimes I do not, easy to forget to put in/takeout this custom switch).
-rb 0x003 -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f"
3) Variable list default to always alphabetized, instead of having to click column header every time you open variable window. Clicking header would then simply toggle it ascending/descending.
4) Lockable user macros, others can use but not break them (like your component macors).
5) Ability to make calculation block larger/longer. Since there is issues with comments overlapping other logic in some cases I simply started using calc blocks to enter my comments. Would be nice to be able to stretch the calc block so more area is viewable at one time.
Thanks Steve, this is great that we can use the latest PICkit CMD software.
Ron
Last edited by Ron on Sun Apr 05, 2009 7:01 pm, edited 3 times in total.
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Thanks for checking this out for us. I'm glad it works as it saves us a job in customising the app.
Flowcode V4 is coming, but we have had to cut back a few of the features that we hoped to put in. The cost to upgrade will probably be 50% of the price of the V4 version. I believe that there will be a small increase in the price of the professional version (I think it will be Β£149) - which means the cost to upgrade the pro version would be Β£74.50.
There are many improvements which we will list in a forthcoming article - sign up for the newsletter if you want to see this.
Specifically, here's some info about your requests:
Flowcode V4 is coming, but we have had to cut back a few of the features that we hoped to put in. The cost to upgrade will probably be 50% of the price of the V4 version. I believe that there will be a small increase in the price of the professional version (I think it will be Β£149) - which means the cost to upgrade the pro version would be Β£74.50.
There are many improvements which we will list in a forthcoming article - sign up for the newsletter if you want to see this.
Specifically, here's some info about your requests:
This is just too difficult to implement at the moment.1) Ability to manually place logic blocks and connect destination lines.
Only the additional linker option is currently not stored as part of the program. I would suggest you create a special FCD file for your bootloader program that has the appropriate linker option, and then simply alter the target device when you need to.2) Storing all pic/compiler related information in flowcode project file. Config bits, processor speed, all compiler options (bootloader I use requires special switch to be added in the compiler options, sometimes I use bootloader, sometimes I do not, easy to forget to put in/takeout this custom switch).
-rb 0x003 -ld "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\lib" libc.pic16.lib flowcode.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f"
This might happen, but is fairly low down in the list. During simulation (and when debugging), you can add certain variables to a "watch" window and so the display of variables should not be too much of a problem.3) Variable list default to always alphabetized, instead of having to click column header every time you open variable window. Clicking header would then simply toggle it ascending/descending.
I'd like to implement this, but again, this might not "make the cut".4) Lockable user macros, others can use but not break them (like your component macors).
These blocks now auto-expand to reveal all text within them.5) Ability to make calculation block larger/longer. Since there is issues with comments overlapping other logic in some cases I simply started using calc blocks to enter my comments. Would be nice to be able to stretch the calc block so more area is viewable at one time.
Re: Using PICkit2 with Flowcode
Hi,
Is there any way to make the command line parameters I tested a "default" setting? A file that we can easily hack???
I do not want to have to rename the standard pk2cmd file to match your modified one.
Thanks
Ron
Is there any way to make the command line parameters I tested a "default" setting? A file that we can easily hack???
I do not want to have to rename the standard pk2cmd file to match your modified one.
Thanks
Ron
- Steve
- Matrix Staff
- Posts: 3429
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: Using PICkit2 with Flowcode
Flowcode gets its default settings from the HKEY_LOCAL_MACHINE area of the registry. You could edit this by hand (you would need admin privileges to do so) - but just make sure you take all the necessary precautions if you are not at ease with editing the registry as you can seriously mess-up your Windows installation if you do something wrong.
The exact registry key for Flowcode compiler defaults is:
The exact registry key for Flowcode compiler defaults is:
Code: Select all
HKEY_LOCAL_MACHINE\SOFTWARE\MatrixMM\FlowCodeV3\DefaultCompiler