Page 1 of 1

Programming failed 18F45K22

Posted: Wed Feb 08, 2012 8:20 pm
by simsto
Good evening,

I would like to use a PIC18F45K22 with the EB006 and the LEDArray. I am using a 4 MHz Oscillator. I have build the attached Flowchart.
Flowcode1.fcf
(5.5 KiB) Downloaded 389 times
It doesn't work and I think that something is wrong in my configuration.

Could you please give me a hint?

Thanks in advance.

Best regards
Simon

Re: Programming failed 18F45K22

Posted: Thu Feb 09, 2012 1:01 am
by medelec35
Hi Simon,
It's best to leave extended instruction set Enabled Bit > disabled

Have you got a pull-up resistor(E.g 10K) connected between pin 1 and +5V supply?

In not then you need to either connect a pull-up resistor, or change MCLR pin Enable to disabled.

There could also be a problem with your crystal or associated components?

Make sure caps (if crystal is used) are of the correct value.

Martin

Re: Programming failed 18F45K22

Posted: Thu Feb 09, 2012 12:43 pm
by dazz
Hi simon

ive checked your file and its ok on my hardware(different from yours) try this attached hex file and see if it works, if it does let me know

Re: Programming failed 18F45K22

Posted: Thu Feb 09, 2012 5:20 pm
by simsto
Hello dazz,

thank you.
But it doesn't work. I've attached my configuration. After Programming with PPPv3, I get the error: Programming failed: <1><2><3><5><6><8><9><10><11><12><13>

Thanks in advance.

Best regards
Simon

Re: Programming failed 18F45K22

Posted: Thu Feb 09, 2012 6:01 pm
by dazz
hi

try enabling the internal/external osc switchover and see what happens, if it works then its something to do with the xtal. i loaded your original hex into ppp and noticed that the configs wernt the same as in your flowchart, there is something on the forums regarding 18f config settings
hth

ythought i was ging mad for a minute here the thread http://www.matrixmultimedia.com/mmforum ... 18f#p31781

Re: Programming failed 18F45K22

Posted: Thu Feb 09, 2012 10:28 pm
by JonnyW
Hi. That fix only applies to the new Flowcode v5.0. Looking at this file I don't think this is a v5 file - could be wrong though!

Jonny

Re: Programming failed 18F45K22

Posted: Fri Feb 10, 2012 6:31 am
by simsto
Hello,

I'am using Flowcode v4.5. Though, I had a look at the link but didn't use the files.

@dazz
I' ve done as you told me. Programming failed stays the same, but the LEDs are flashing nearly correct. I've tried some other programming(reading from port b and write to port d). That doesn't work. But I think programming with failure is pointless.

I found a topic about the 18F25k22 here:http://www.matrixmultimedia.com/mmforum ... config+18f

I tried the config in the Flowcharts there but it ends up in programming failed.

Here is my last attempt:
Flowcode1.fcf
(5.5 KiB) Downloaded 343 times
I would really appreciate it if you have another idea.


Best regards
Simon

Re: Programming failed 18F45K22

Posted: Fri Feb 10, 2012 10:03 am
by medelec35
Hi Simon,
When you fist posted about programming failed and posted your flowchart I got the impression that you can send flowchart to target device, but the hardware did not work.
E.g LED's not flashing when suppose to etc.

But since error is:
simsto wrote: Programming failed: <1><2><3><5><6><8><9><10><11><12><13>
Then you should be looking at comms part of your hardware rather than flowchart (assuming LVP is disabled).

So what is your hardware set up for programming chip?
EB006 programming board, or your own purpose built hardware with ICSP connections, or HP488 Development board or PICKIT2/3 etc.?

Looks like chip may not be getting all correct voltages (e.g VPP should rise, clock, data etc)
Don't forget the following pins of chip are involved with programming:
MCLR/VPP/RE3
VDD
VSS
RB7
RB6
So if using your own hadware, caps connected between RB6 and GND or RB7 and gound would cause failure.
Also connecting VPP directly to +5V will cause failure.

What you can try within Flowcode is select chip, Configure.
then in the new window select Autodetect PICmicro. What happens. Do you get any warnings, or is your target chip displayed OK?
Reason LED's may be flashing could be due to when chip was last programmed without the errors your getting now?
Try changing the Patten, so a LED that was not lighting before lights now. Or if only 1 LED connected get it to flash every second for 5 times, then stay off.
That way you can confirm if flowchart is compiled to chip or not,

Martin

Re: Programming failed 18F45K22

Posted: Fri Feb 10, 2012 4:34 pm
by simsto
Hello Martin,

I am using the EB006 programming board with 4Mhz Chrystal. I've used a 18F4455 without problems. There is only the LEDArray connected to Port D. The chip is detected automatically.

The programm is written to chip. I can change the output value and it is displayed correct. But every programming shows me the above mentioned error. The chip has never been programmed correctly. Is it possible that the chip is damaged?

Best regards
Simon

Re: Programming failed 18F45K22

Posted: Fri Feb 10, 2012 5:17 pm
by medelec35
simsto wrote: The programm is written to chip. I can change the output value and it is displayed correct. But every programming shows me the above mentioned error. The chip has never been programmed correctly. Is it possible that the chip is damaged?
Hi Simon,
I could be wrong, but to me sounds like PPP cosmetic error (pure guess), since the o/p is displayed correctly and chip detects.
If all programs work and timing are correct, then I would not worry about it too much.

Staff @MM would be in a better position to say of course.

Re: Programming failed 18F45K22

Posted: Fri Feb 10, 2012 6:04 pm
by Steve
Is this related to this post?
http://www.matrixmultimedia.com/mmforum ... k22#p28168

I could be wrong, but PPP may not be able to program the 18F4xK22 chips (the 18F2xK22 seem fine).

I've just tried here and I get some weird results. I get the "programming failed" messages and when I read back, the file is all zeros.

I haven't got time to try with PICkit at the moment, but I seem to remember there was no problem using this to program that device.

Re: Programming failed 18F45K22

Posted: Mon Feb 13, 2012 3:16 pm
by JCMB
J have the same problems with 18F46K22.
Using EB-006-00-7 and FlowCode V5, !MCLR disabled, Single-Supply ICSP disabled.

Re: Programming failed 18F45K22

Posted: Fri Feb 17, 2012 8:45 am
by simsto
Good morning,

I've got my 18F45K22 working. I bought a PICKIT3. The program is transferd from within Flowocde with the appropriate compiler options from here.
The configuration is set out of MPLAB.
It is a little bit time-consuming but it works fine.

Best regards
Simon

Re: Programming failed 18F45K22

Posted: Tue Apr 10, 2012 10:59 pm
by topbanana
Hi,
The 18F45K22 is our current choice of chip for the application we're developing. We have to use a PickIt 3 to program the chip which is a shame.
Are there any plans to support the PIC18F2X/4XK22 range with PPP3?
Tb.

Re: Programming failed 18F45K22

Posted: Wed Apr 11, 2012 8:02 am
by Steve
We do have plans for a large revision to our EB006 multiprogrammer E-block and hope to include support for this range of chips. The redevelopment is at an early stage, but I would hope to have something by the end of the year.

Re: Programming failed 18F45K22

Posted: Wed Apr 11, 2012 8:37 am
by topbanana
Thanks for your quick response Steve.
Our team partnership of three companies are just starting a large commercial development project using your product range. Would you recommend we select another chip for the moment? Is it just the EB006 that needs updating or are there features that Flowcode doesn't support well at the moment?
BR,
Tb.

Re: Programming failed 18F45K22

Posted: Wed Apr 11, 2012 8:47 am
by DavidA
Hello,

I beleive that FLowcode supports the chip fine, it is PPP and the EB006 which has problems programming the device.

Re: Programming failed 18F45K22

Posted: Wed Apr 11, 2012 9:16 am
by Steve
...and the EB006 supports this device, but you will need to use a PICkit to program it.