PIC18F2580 Programming failed

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

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 and bypassing the flowkit)

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. But I still can't use Flowcode to compile and download.
Attachments
Flowcode1.fcf
(17.13 KiB) Downloaded 220 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: PIC18F2580 Programming failed

Post by Benj »

Hello,

Try disabling the extended CPU config setting. This should allow the LCD to work correctly.

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 »

So don't use Flowkit, compile with extended CPU = Disabled, and then download with Microchips PICKit2? Is this 'the' solution or just temporary?

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 »

Using the PICKit 2 with the change to the extended CPU seems to have cured the LCD on Port B.

My 4580 chip is in (I have to go pick it up), so if you want to pursue why I can't download with the Flowkit, it will need to be today. Hopefully I will not have any issues with the 4580.

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 »

Extended CPU
Looking through posts on here it looks like the best advice is unless you specifically need the extended cpu options is to have it turned off.
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 »

I have no idea what the option does. What I really need is to be able to download directly from Flowcode. Switching the jumpers around to download is OK for getting used to the system, but long run it isn't fun. I also worry about having the PICKit2 and USB cable accidentally connected at the same time.

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,

Do you have to switch the jumpers around? If you are not using PortB pins 6 and 7 in your application then you should be able to leave the jumper where it is and still allow the application to run, make sure the PICkit is not holding the device in reset. PICkit2 and USB cable both plugged in together should not cause any issues.

Have you setup Flowcode so it is using the PICkit directly or are you manually loading via PICkit each time. If you are doing this manually then here are the details for setting up Flowcode.

http://www.matrixmultimedia.com/support ... f=22&t=672

The chips should arrive today so I will see if I can get them to work correctly with the PPP software.

Post Reply