Page 1 of 1

Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 6:19 pm
by JLeith
Hello All,
It has been a while since I had to asked for some further help with my project in Flow code.

I have the program running nicely in Flow code but when I load the PIC I can send a High into RB0 but I don't get the action on the PIC as I see on Flow Code.

I have the PIC on a Bread Board so I don't get other parts reacting. ( PIC16F1826 )

I have uploaded my program to this topic. ( March 14 )

On a quick note is there a way to have my PICKIT 2 running version 2.61 work in flow code saving me to save the HEX and use the PICKIT2 software. I tried the setting from other 2007 post but they didn't work with the new 2.61 version ?

On a simple test I would send a High into RB0 and in the Ball selection ( 1 ) I have add Port A 0 to send out a High when entering the Ball selection.

It is like my RBO is not activating the Switch Value ?

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 8:15 pm
by medelec35
Hi John,
The configurations has not been set.
That could be the reason why flowchart is simulating ok, but hardware is not working.

As for Pickit 2, I have not go a 16F1826 to try but here are my setting for pickit 2 which programs device via Flowcode just fine.

Programmer:
Location
C:\Program Files (x86)\Flowcode\V5\Tools\PICkit2\pk2cmd.exe

Parameters
-BC:\Program Files (x86)\Flowcode\V5\Tools\PICkit2\ -PPIC%p -F%f.hex -M -A5 -R
I'm running 64 Bit windows, so if your not then (x86) is not required.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 8:27 pm
by JLeith
Hello once again medelec35.

it has been some time since we communicated.

On the Config settings something has gone totally wrong since my Feb project. I have been looking on where I can modify the Config 1 & 2 when I ask FlowCode to Config the chip it comes up with ( Config 1 = 00ff , Config 2 = 0013.

This is a mess - I would like to to know how I fix this to read ( Config 1 = 3FFF , Config 2 = 3713 )

On the program do you see any reason I can't get the RB0 to trigger on the chip ?

I will try the settings fro Flowcode to work directly to PICKIT 2.

So if you can help point me into the changing the Config settings maybe I can get things to work. I think it is in the Header under the FlowCode directory but I don't know how to make the changes.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 8:46 pm
by JLeith
Hy again medelec35,

I tried the PIC2 to flowcode and received a message that a UPDATE to pic2cmd is required.

I looked around the web but no luck finding a update.
Update PK2cmd.jpg
Update PK2cmd.jpg (43.59 KiB) Viewed 13435 times
More fun.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 9:02 pm
by medelec35
JLeith wrote:
This is a mess - I would like to to know how I fix this to read ( Config 1 = 3FFF , Config 2 = 3713 )
Those setting do not look right to me.

To enter config value, just go to configuration settings and:
Config settings.png
(85.24 KiB) Downloaded 7503 times
Leave the 0x in place and enter new configuration settings

As for Pickit2 I did not believe it supports 18F1826?
pickit2 16F1826.png
(69.19 KiB) Downloaded 7503 times
acestu also stated this on a differnt thread.
That's probably why the message is about update required, and this may not have been done to get you to purchase Pickit3.
Have you managed to program your 16F1826 via stand alone programming software?

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 9:17 pm
by JLeith
medelec35 hello,

I have looked through the options and I don't see the screen you have listed ??

I have I think placing the hex into my chip PIC16F1826 which is supported under the 1v8 voltage settings in the PICKIT 2 program.

Once I have the hex loaded I manually change the Config bits. I hope you can point me to your nice settings.

It is hard to know what the chip has with nothing moving.
Flow menu items.jpg
Flow menu items.jpg (55.07 KiB) Viewed 13431 times
John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 9:25 pm
by JLeith
A Little more info.

Here is the action from the PICKIT 2 program.
PIC2 hex.jpg
PIC2 hex.jpg (30.61 KiB) Viewed 13427 times

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 9:40 pm
by kersing
To set the configuration in FC5, in the "Build" menu choose "Project Options". On tab "General Options" there is a button "Configure chip". That button opens the screens Martin included.
DIALOG.JPG
DIALOG.JPG (37.96 KiB) Viewed 13426 times

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 9:47 pm
by medelec35
Your Version of Flowcode is not up-to date
You can download the latest version from here:
http://www.matrixmultimedia.com/flowcode.php
Make sure you have the last 2 sections of your key handy 1st as you will need it for the download to start.

As for the configuration screen.
This only needs doing once.
Go to 'Build', Compiler options' and select programmer.
Make sure Use external program to set configuration options is ticked.
In the location box should be the correct path for PPP

Select OK.

Now go to Build then select Configure the Chip.
You should have the same options as I have then.

As for the out of date device file have you tried the latest one from here:
http://www.microchip.com/stellent/idcpl ... e=en023805
?
It looks like your target device is supported:
pickit2 16F1826 v2.png
(71.44 KiB) Downloaded 7490 times

Edit crossed posts ..sorry Jac

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 11:20 pm
by JLeith
medelec35 You have a Magic PC ?

I did the upgrade - Now when it finished it posted a screen asking for pass key but if this is a upgrade no key needed. So this was an upgrade so I didn't put in a key.

I don't get that MAGIC screen you have on your PC.

Here is what I have and also the Flowcode version.
Configure Chip.jpg
Configure Chip.jpg (57.91 KiB) Viewed 13417 times
I looked for another option to turn on the screen but no luck.

This whole project has been cursed since I started and I have to come up with a fix ASAP because the baseball season starts in April and 8 months to build a project is not working out well.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 14, 2013 11:42 pm
by medelec35
JLeith wrote: I don't get that MAGIC screen you have on your PC.
Hi John,
Did you follow this step:
medelec35 wrote: As for the configuration screen.
This only needs doing once.
Go to 'Build', Compiler options' and select programmer.
Make sure Use external program to set configuration options is ticked.

In the location box should be the correct path for PPP

Select OK.

Now go to Build then select Configure the Chip.
You should have the same options as I have then.
settings.png
(42.28 KiB) Downloaded 7481 times

Re: Flow code 5 to my Chip PIC16F1826

Posted: Fri Mar 15, 2013 12:00 am
by JLeith
I'm sorry missed the first check box.

Ok I'm off to see what happens.

I will post a new Version once I confirm the config works.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Fri Mar 15, 2013 1:05 am
by JLeith
medelec35 hello,

Well the Configuration has been fixed, Thank you.

Now I still have not been able to get the PICKIT 2 working. Now I have the Current version in the PICKIT 2 software which is not the same in the Flowcode application.

Not sure how to get Flowcode to work with the new 2.61 version of PICKIT 2.
Forcode vs PICKIT 2.jpg
Forcode vs PICKIT 2.jpg (65.66 KiB) Viewed 13406 times
Still working out how the PIC is processing the code no way near what Flowcode does.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Fri Mar 15, 2013 1:29 pm
by Benj
Hello,

All you should have to do to get PICkit working with the new DAT file in Flowcode is to copy the DAT file into the following location on your PC.

C:\Program Files (x86)\Flowcode\v5\Tools\PICkit2

or on a 32-bit PC

C:\Program Files\Flowcode\v5\Tools\PICkit2

Then follow the instructions detailed here to setup the PICkit 2 command line as your default programmer.

http://www.matrixmultimedia.com/support ... f=68&t=787

If this fails to work then you may also need an updated version of the standalone command line pk2cmd.exe tool which is produced by Microchip.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Fri Mar 15, 2013 6:22 pm
by JLeith
Hello Benj,

it has been a while since we worked on my never ending problems with my Scorebaord.

Well it must be a brighter day I double checked my settings and I emailed Microchip and they sent me a link to a new PK2cmd file.

I uploaded the pk2cmd and now I don't get the error on the outdated pk2cmd. I get that It can't find the chip.
Find Chip
Find Chip
FIND Chip.jpg (42.65 KiB) Viewed 13319 times
The PICKIT 2 is plugged into my USB port. Not sure how Flowcode can find my chip I don't see a setting to point it to the USB.

Odd when I use the PICKIT 2 software it finds the chip... well I think it does because I get flashing lights on the PICKIT 2. Not 100% sure the PIC reads the code because it does not execute the code as outlined in Flowcode. I posted another item on the programing difference from a PIC16F88 which was the project I worked with and selected the bigger chip PIC16F1826 but it is not working.

Benj I would like to see if there is someone that could upload my project and see if it could work. I'm almost at the point in saying this is not possible to do in the real world. I don't want to cash in because in flowcode the project works exactly like I would like to see.

Well I'm going to keep working on the beast thought I might try a basic program to my PIC like a switch on Port B and turn on a Led on Port A when pushed.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Fri Mar 15, 2013 6:37 pm
by Benj
Hello,

I just found this which says it supports your device and in the folder is a new hex file, presumably new firmware for the PICkit itself so it can talk to all the new devices.

http://digital-diy.com/forum/pickit2/ne ... t1722.html

Try adding the hex file, the pk2cmd.exe and the PK2DeviceFile.dat to your "Tools\PICkit2" directory and seeing if this helps at all.

You may also be able to flash the PICkit2 with the updated firmware using the stand alone PICkit 2 software.

Let us know how your getting on. Last resort may be to get hold of a PICkit 3 as I know these do work properly with the new devices.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Tue Mar 19, 2013 10:07 pm
by JLeith
Benj you are a wizard.

Thank you so much I down loaded the ZIP file and placed the files into the Flowcode 5 PICKIT 2 directory and it worked first time.

:D John

Maybe you could post the link for other users with PICKIT 2 and Flowcode 5.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Wed Mar 20, 2013 10:40 am
by Benj
Hi John,

I've added this forum topic to the FAQ for the PICkit2.

Thanks for letting us know how you got on.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Wed Mar 20, 2013 5:41 pm
by JLeith
Hello Benj

Benj you know flowcode inside out.

Benj is there a way to add more chips to the Flow of the project with in Flow code.

I have the PIC and buttons to activate the functions I would like to know if I could add additional chips like this.

PIC ----- 3 to 8 decoder ---- ULN2004 Segment driver to simulate the full project.

I see there is many options that I have no knowledge on how or when to use them.
(Comm) (Peripheral) (Mechatronics) (DSP) ( Miac Module) (Misc)

Just trying to see if I could follow the PIC output.

John

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 21, 2013 3:39 pm
by Benj
Hello John,

You can create a flowcode program to control all the external devices but you will not currently be able to simulate them in v5. You can however use the ICD feature to try and debug the running hardware.

In v6 we hope to allow the features you are suggesting where you can add your own components and peripherals and make them behave like the real device.

Re: Flow code 5 to my Chip PIC16F1826

Posted: Thu Mar 21, 2013 7:59 pm
by JLeith
Hi Benj

I thought that might be the case.

Not a major problem I hope my project will work as it does in flowcode.

All the best,
John