Page 1 of 1

Flowkit and 3rd party hardware

Posted: Fri Jan 27, 2012 12:51 pm
by djm2
Hi there

Please forgive my stupidity if I am being stupid here but I have just got Flowcode v5 and a flowkit programmer/debugger device - HP299 and I am using them for the first time.

I have writen a very small program to flash an LED which I am trying to send down to my device - PIC18f4520 which is located on a easy pic 6 board from Mikro Elektronika. I have the in side of the HP299 connected to my PC and a small ICD2 cable going from the SIL header on the HP299 to the ICD2 connector on a easy pic 6 board. I keep getting an error each time I try to compile to the chip. The switch on the HP299 is set to "ICD". Is it possible to program with the HP299 as well? I would have assumed it would be.

If I try the compile to chip option I get a pop up windows saying - "USB cable is not connected - Continue ? Yes No". I had installed the latest drivers from the web site and the device appears to be OK in device manager.

If I press play I get the following error - "ICD has failed to communicate with the target, ICD has failed to communicate with the target, Do you want more information? ". If you press yes it says "First line is what is should be. and then a load of hex numbers".

David

Re: Flowkit and 3rd party hardware

Posted: Fri Jan 27, 2012 2:08 pm
by Benj
Hello David,

The Flowkit is not currently a programmer and cannot be used as one. You must use a programmer to load the hex file onto the PIC and then you can use the Flowkit to debug using the ICD pins specified in Flowcode.

Re: Flowkit and 3rd party hardware

Posted: Tue Jan 31, 2012 12:56 pm
by dazz
djm, have you got the easypic6 programmer working yet ? i spent 2 hours yesterday pulling my hair out getting an easypic7 working with flowcode, in the end it was as simple as removing a setting in the setup :lol:
As for the icd i cant see any reason why it should not work, again maybe its a jumper setting on the easypicboard

Re: Flowkit and 3rd party hardware

Posted: Wed Feb 01, 2012 5:22 pm
by djm2
Hi there

No I havent emailed microchip who sent me to here - http://www.microchip.com/cisar/

I am getting some very weird results. So I have an easy pic 6 board with a PIC18F4520 and 4MHz clock.

Flowcode compiles fine then I import the .asm into MPLab. I have copied the output window from when I try to connect/program at the bottom of this message - it just goes in a constant loop of the same error messages. When I try the small test board they give you with the ICD3 it says it works fine. I have a load of different types of development board and it doesnt work with any of them.

Guess I will have to play around some more and try to work it out - very frustraiting! First day I got the flowcode software I got a simple program down to the PIC the next day the same program wont go down arghhhhh!!!!!!!!!

What did you change to get your easy pic board to work?



Target Detected

ICD3Err0021: Command not echoed properly. Sent 70, received
3f.

ICD3Err0035: Failed to get Device ID. If you experience
persistent problems communicating, the ICD 3 test interface
can be used to help diagnose the problem.

ICD3Err0021: Command not echoed properly. Sent 3f, received
70.

Target Removed
The MPLAB ICD 3 is missing its Device Database. Please reconnect
to the PC and try again.

ICD3Err0021: Command not echoed properly. Sent 3f, received
ff.

Target Detected

Re: Flowkit and 3rd party hardware

Posted: Wed Feb 01, 2012 6:12 pm
by dazz
Hi
I pointed the compiler options to the chip programing software from the easypic (see picture attached) , when you compile to chip from flowcode it pops up the config box where you can set up the config for the chip and then press write and it will programme the chip via the easypic board, get that bit sorted then read the easypic manuals for setting up icd via the icd2 port on the easypic

hth

edit image too small

the parameters are -%p -f "%f.hex"

Re: Flowkit and 3rd party hardware

Posted: Thu Feb 02, 2012 3:24 pm
by djm2
Hi there

Thanks for the reply. Really good idea you suggested there. I normally just use the ICD2/3 and forgot about the on board programmer. I tried it and it appears to work. I wrote a simple program to flash an LED and it simulates fine however, nothing seems to happen when I send it down to the chip - PIC18F4520 - 4MHz.

I am guessing that I also have a problem with the ICD3 programmer I have as well. HS setting enabled, watchdog disabled. I have attached a copy of the test program I am trying to get working.

Re: Flowkit and 3rd party hardware

Posted: Thu Feb 02, 2012 6:29 pm
by dazz
Hi
I dont have that chip here(i feel a sample request to microchip coming on ;) ) i have tested your program using a 18f 45k22 and i programs and works fine on my easypicboard, however what i did notice was whenever the mikroprog suite starts it points to the last hex file loaded( something to do with the parameters i use will look into it), simply load the one you want to use, when you get the easypic board reliably programming . then have anothew go with the icd ,

Re: Flowkit and 3rd party hardware

Posted: Thu Feb 02, 2012 9:30 pm
by medelec35
djm2 wrote: nothing seems to happen when I send it down to the chip - PIC18F4520 - 4MHz.

I am guessing that I also have a problem with the ICD3 programmer I have as well. HS setting enabled, watchdog disabled. I have attached a copy of the test program I am trying to get working.
So long as you realise a program will not run until you select Run on your flowchart simulator, since in ICD mode Simulator takes control or your hardware. E.g if you select stop or pause on your flowchart, then your hardware will also stop or pause.

What happens when you press F8 key?

What should happen is you get a green outline instead of the normal red outline during simulation. If it is green then that's ICD mode.

If you still have issue e.g communication message, then if you post a screen shot, we can help you further.

Note for ICD mode to work, you must not have weak pull-ups enabled, or configure B6 or B7. they must be used in your program

Martin

Re: Flowkit and 3rd party hardware

Posted: Sat Feb 04, 2012 12:23 pm
by djm2
Hi there

Thanks for your replies. Eventually found the problem as usual pritty stupid! After I replaced the crystal it started working again. AArggghh. But now I can program the PIC through the easy pic programmer and it looks OK.

Thanks for your help!

Re: Flowkit and 3rd party hardware

Posted: Sat Feb 04, 2012 4:41 pm
by dazz
Glad its working again for you, been having hells trouble this end getting simple programs running and it wasnt until i tried yours that i finally sussed it out, as i mentioned in my last post. oh and the config settings for the chips, finnaly learning all about them now, mainly xtal related as well