Using FlowKit in Flowcode V6

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
blackelle93
Posts: 5
Joined: Sun Sep 15, 2013 4:48 am
Has thanked: 4 times
Been thanked: 2 times
Contact:

Using FlowKit in Flowcode V6

Post by blackelle93 »

Hi
This is my first post to the forum, so hope I'm doing this right...............I have V6 chip pack and want to implement the ICD function for it. My understanding is that I need to purchase the FlowKit module to do this, however before I do, can someone confirm for me that FlowKit will operate with just a standard chip pack and that the professional upgrade is not required.

Thanks in advance

Richard

User avatar
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 FlowKit in Flowcode V6

Post by Benj »

Hello Richard,

We have not yet implemented ICD (in circuit debug) or ICT (in circuit test) in Flowcode v6 but these should both be in for the planned future update v6.1.

ICD and ICT will require a pro license as well as a chip pack license. The datasheet is wrong about this and we are working on getting this fixed.

The Flowkit is purely a ICD tool at the moment, the upcoming EB006v9 is both an ICD and ICT tool.

We will then likely roll out the ICD and ICT to our other multiprogrammer boards and may upgrade the Flowkit so it has programming capabilities.

blackelle93
Posts: 5
Joined: Sun Sep 15, 2013 4:48 am
Has thanked: 4 times
Been thanked: 2 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by blackelle93 »

Thanks for the reply - I'll need to upgrade to the pro version. Are you able to indicate when V6.1 might be released?. Also re the forum, how are the "Thanks" votes initiated. What do I need to do, if anything?.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by kersing »

For thanks votes select the little thumbs up icon at the right side of the subject line of the message you want to thank for.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by saschech@gmx.de »

kersing wrote:For thanks votes select the little thumbs up icon at the right side of the subject line of the message you want to thank for.

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

When is the expected release of ICD in Flowcode 6.1? Also, what programmer/debugger will it support ... Pickit3, EB006, Flowkit?

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by Brendan »

Hi Ben...
We will then likely roll out the ICD and ICT to our other multiprogrammer boards and may upgrade the Flowkit so it has programming capabilities.
Increasingly our projects are 3.3V logic for compatibility with other popular off-shelf devices designed for this voltage. Looking at the existing FlowKit I see that it uses an 18F4455 with a 4MHz oscillator. If an update to FlowKit were on the roadmap I'd be grateful if you'd consider using (e.g.) an 18LF4455, which would permit direct integration with lower voltage logic.

As with other programmers, you could then sense the target rail and power the PIC accordingly, as it's rated to 2V at 4MHz clock speed.

All the best,

Brendan

User avatar
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 FlowKit in Flowcode V6

Post by Benj »

Hello Brendan,

The existing Flowkit will work fine with 3v3 signals. Though I do appreciate what your saying say if say we wanted to go down below 2.5V.

v6.1 is planned for early next year but this is subject to change. We are working on the ICD and ICT aspects at the minute as we want to be able to show them off. We are now pretty close with these so hopefully they will be included in a much nearer update so we can get it out in the field being tested and used.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by kersing »

Benj wrote:The existing Flowkit will work fine with 3v3 signals.
As the Flowkit output signals are 5V, make sure the circuit you are connecting to is 5V tolerant. (Or level shift the signals to make them 3.3V)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by Brendan »

Hi Ben.
The existing Flowkit will work fine with 3v3 signals
Thanks for the confirmation. We'll simply add series current-limiting resistors to the I/O for now and I think we're sorted :D


All the best,

Brendan

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

Has anyone used Flowkit with Windows 8 machine? The Flowkit driver will not install (lastest 64 bit from website). I have tried running as administrator, and in Windows 7 compatibility mode, but no luck.

It does show up in the device manager as an unknown device.

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

I got the Flowkit driver to install on the Windows 8.1 machine. I had to restart the machine with the digital signatures for drivers disabled (under PC settings, advanced diagnostics).

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

I am having trouble getting Flowkit to communicate with a PIC16LF1824. I am using Flowcode V6.0.7 and a new Flowkit with lastest 64 bit driver for Windows. I started with a basic program, just 1 second flashing LED on a custom board. The custom board uses the internal 500K clock. I am using J2 pin of the FLowkit with DAT wired to AO pin on the board and CLK wired to A1 pin. ICD is the only thing configured on the chip, yet I can't get the Flowkit to communicate with the PIC board. I keep getting this error message "ICD has failed to communicate with the target. Did not read required Firmware ID size back. First line is the correct FW ID, second line was read from the chip: 45 95 86 d4 5b 6c a9 46 "(see attached file).

Any ideas what the problem would be?
Attachments
flowkit error.doc
(32 KiB) Downloaded 124 times

User avatar
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 FlowKit in Flowcode V6

Post by Benj »

Hello,

The 500KHz clock sped could be the cause of the problem. What is your ICD comms speed set to in the ICD options window? A higher number will give you a longer time out delay. Values of 1000 or 1500 might work.

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

Hi Ben, it is the exact same result (exact same error message) no matter what I try. The Flowkit has a slow flashing LED indicating it is trying to communicate. I have tried 500khz clock with a ICD comm speed of 200, 500, 1000, 1500, 2000, 2500, 3000. I have tried 1Mhz clock with comm speed of 200, 1000, 1500, 2000 and again the exact same result. I have tried two different test boards with PIC16LF1824 MCUs. The board is battery powered so can't be problem with the ground level between Flowkit and board under test.

The test program runs the code properly when ICD is disabled (LED on for 1 sec, then off for 1 sec).

I don't know what to try next! I have attached the program so you can see if I'm missing something in the config.

Thanks for help, Reg
Attachments
ICD_test.fcfx
(16.18 KiB) Downloaded 133 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by medelec35 »

Hi rnicos,
Since you're using internal osc, I'm wondering if it has something to do with:
Benj wrote:
Ok when the ICD is enabled the program will run until it gets to the first icon in your flowchart. It will then wait there until told to proceed.

Flowcode is expecting the clock speed to be 4MHz however when the chip first starts using the internal oscillator the clock speed is set to 31.25KHz.

It is only when the first flowchart block is called that the clock speed is switched to the 4MHz setting.

So to work around this problem is fairly simple. You can do this using a custom component or any other component you happen to have in your program. Select the component and click the custom code button. In the custom code window select the Initialization macro and click edit. In here add your line of C code to configure the internal oscillator. Now click OK to exit the custom code windows and delete the icon containing the oscillator frequency change.

Note: You do actually have to call the component somewhere in your program to allow the initialization code to be included into the C code. This is why I use the LED component at the start of the attached program.

Your program should now work as expected with the ICD :mrgreen: This has been confirmed on my 16F767 device.
I was using a 16F737 with internal osc at the time.
The above was posted before V6 was out so you can't add a custom component and follow the work around.
Perhaps Ben can suggest the way around this?
That is of course if V6 is even affected in the same way as pre V6.
It may not and I could be wrong, as have not even tried with internal osc with V6 yet

If not resolved today, I can have a play tonight when I get home from work.

Martin.
Martin

User avatar
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 FlowKit in Flowcode V6

Post by Benj »

Hello,
That is of course if V6 is even affected in the same way as pre V6.
It may not and I could be wrong, as have not even tried with internal osc with V6 yet
Yes this is a problem and as the custom code method will no longer work around the issue it looks like it will be down to a FCDX file mod. Thanks for reminding me of this mod Martin.

Open the file 16LF1824.fcdx from "C:\Program Files (x86)\Flowcode 6\FCD\PIC" in a text editor and save the file to your desktop.

Scroll right down to the bottom of the file and find this section.

Code: Select all

      <init code="ansela = 0x00;\nanselc = 0x00;\n" />
Add your osccon control code here followed by a carriage return "\n".

Code: Select all

      <init code="ansela = 0x00;\nanselc = 0x00;\nosccon = 0x3A;\n" />
Save the file and then copy the file from your desktop back into the Flowcode FCDX directory. Then reload your Flowcode project and the clock speed change will be executed before the initial ICD pause kicks in.

rnicos
Posts: 16
Joined: Tue Oct 01, 2013 6:53 am
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Using FlowKit in Flowcode V6

Post by rnicos »

It is working now!

I made the change to the FCDX file as you mentioned, but it still did not work. So I looked a little closer at the configuration settings, and per Microchip, you should not enable ICD in chip configuration. So once I disabled ICD within the chip configuration, it started to work. Flowcode ICD is still enabled.

I also had to set the comm speed to 500 to get it to work reliably.

Many thanks,

Reg

Post Reply