PIC18F2580 Programming failed

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

PIC18F2580 Programming failed

Post by dbasnett »

EB006 v6
SW1 - Fast
SW2 - XTAL
ICD2 / USB - USB
PSU / USB - PSU
LVP Selection - All three set for IO Port
Flowcode Pro v4.5.18.74
FlowKit connection - PC-->FlowKit In - FlowKit Out --> EB006 USB
Custom USB Device - Matrix PICmicro Programmer - v 1.0.0.6, 12/19/2007
CPU - PIC18F2580
Port A - LED
Port B - LCD
Port C - nc
Port D - nc
Port E - nc


Using the same simple program I have been using to teach myself Flowcode, I replaced the 16F88 with a 18F2580 (http://ww1.microchip.com/downloads/en/D ... 39637d.pdf).

When I try to compile to the chip I get this:

...
success

Return code = 0

Launching the programmer...
C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Tools\PPP\PPPv3.exe -cs 2 -chip PIC18F2580 -nogui "Flowcode1.hex"
Sending program...
Erasing the PICmicro
NOTE: EEPROM data will also be erased!

............

Writing program memory
Writing configuration memory
Writing id-locations
Reading program memory
Reading configuration memory
Finished reading PICmicro contents
Programming failed:

Program memory check failed

(NOTE: if the PIC is code-protected, this message will be
displayed even if the program has been sent correctly)
That took 6.895 seconds

Return code = 0

FINISHED

I also created a new program targeting the 2580. The program only had a begin / end. It also failed with the same problem.

(I also tried programming with the boards not connected)

I would have posted this in the Flowcode V4 forum but I haven't been authorized yet.
Attachments
Test1.zip
(134.58 KiB) Downloaded 360 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: PIC18F2580 Programming failed

Post by JohnCrow »

Hi
Ive just tried your flowchart and it compiled to hex successfully here.
(Ok i think you are getting that far before it fails to write to the chip but this might be worth a try)
Flowcode1-test.hex
Hex File
(4.75 KiB) Downloaded 343 times
Try loading the hex to the pic directly with the PPP application.

Have you tried with flowkit disconnected ?

Do you need settings such as brown out turned on ? May be worth turning off anything in advanced setting you dont need.

I dont have the device you are using but the program runs ok on on my EB006 V7 board in a PIC18422

Generally you only need to upload the .fcf file (i.e the main flowchart) for someone to look at problems for you.
1 in 10 people understand binary, the other one doesn't !

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

Same error when I try just PPP. In both cases the first thing that happens is that I get a message saying that the device has not been erased. (I tried the hex file I had and the one you posted)

How would I program the device with the flowkit disconnected? If you mean take the USB cable directly to the board, I have done that and it has the same results.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times

Re: PIC18F2580 Programming failed

Post by JohnCrow »

Hi
You dont have to have flowkit connected

As you saidt the usb from the pc goes to the usb socket on the eb006.

You could try pulling the jumpers on and off a couple of times. I have seen problems on here caused by a bad connection with the jumpers

I have had the not able to erase problem myself in the past, but I got round it by unpluging the e-blocks from the programmer, and that cleared it.
But i see you have allready tried that.

Try these it might help

Go into chip / expert settings

PortB A/D Enable - set this to configure as digital I/O on reset.
Turn off extended cpu enable - this can cause problems if not needed
1 in 10 people understand binary, the other one doesn't !

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

Before I read your message I figured out how to get my PICKit2 connected. It was able to download the hex without a problem. After downloading I moved all of the jumpers back and the program runs, but the LCD display is messed up. It looks like "0 || || P || 0 ||...". The LED is running correctly.



Using PPP I can read the device but I still can't program it, and when I try it must write something because the program doesn't appear to function at all.

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

My ultimate target PIC is a 4580 which should be here any day.

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

@John - You have had nothing but nice things to say about this product line. So far I've had nothing but problems, which I really wish wasn't the case. I wonder what issues I will have with the 4580? You have been a great help :!:

Maybe the Matrix support people will be able to help me tomorrow.


List of problems to date:
1 - Install of Flowcode
2 - Flowkit realtime debug - still not working
3 - 2580 / 4580 chip

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

There is one other annoyance. I have two screens configured in windows as 'Multiple Displays, Extend these displays'. The left screen is where the start menu is.
It looks like this if you are familiar with the windows display control panel.

1 2

Certain dialog boxes, Configure Chip being one, opens vertically in the middle, but horizontally half the dialog is on one screen and the other half is on the other. Of all the problems I am having this is of least importance.

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: PIC18F2580 Programming failed

Post by Benj »

Hello,
1 - Install of Flowcode
2 - Flowkit realtime debug - still not working
3 - 2580 / 4580 chip
In answer to your problems I have the following good news.

1) We aim to make this better for version 5 as this is a common cause of problems. In the mean time we have several FAQ topic in our FAQ section detailing the procedure and what to do if things go wrong.

http://www.matrixmultimedia.com/support ... 5789b02636

2) There is a help and troubleshooting guide on the ICD available by clicking the Help -> Online resources menu in Flowcode which should help to get you started.

3) Im surprised to hear you are having problems with this device, I'll see if we have one lying around and do some testing for you.

Also the problem with the multiple displays and the position of some of the pop up windows is known but as you say is not critical. Hopefully we can get this resolved for the next release.

dbasnett
Posts: 125
Joined: Mon Aug 15, 2011 1:54 pm
Has thanked: 8 times
Been thanked: 11 times

Re: PIC18F2580 Programming failed

Post by dbasnett »

Benj wrote:Hello,
1 - Install of Flowcode
2 - Flowkit realtime debug - still not working
3 - 2580 / 4580 chip
In answer to your problems I have the following good news.

1) We aim to make this better for version 5 as this is a common cause of problems. In the mean time we have several FAQ topic in our FAQ section detailing the procedure and what to do if things go wrong.

http://www.matrixmultimedia.com/support ... 5789b02636

2) There is a help and troubleshooting guide on the ICD available by clicking the Help -> Online resources menu in Flowcode which should help to get you started.

3) Im surprised to hear you are having problems with this device, I'll see if we have one lying around and do some testing for you.

Also the problem with the multiple displays and the position of some of the pop up windows is known but as you say is not critical. Hopefully we can get this resolved for the next release.
It is #3 that I am most concerned with, though it is interim until I get my 18F4580. Will I have the same issues with the 4580?

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: PIC18F2580 Programming failed

Post by Benj »

Hello,

We should be able to sort this programming problem out for you. I will get hold of some of these family of chips and do some testing.

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: PIC18F2580 Programming failed

Post by Benj »

Chips have now been ordered, should receive them tomorrow. Will let you know how I get on.

Post Reply