Failing to program 18F2431

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
medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Failing to program 18F2431

Post by medelec35 »

I am struggling to program my first 18F2431. All I am starting with is a simple test program. It appears the problem is the configuration settings. This is a part of the message I am getting:

Code: Select all

Building CASM file

Memory Usage Report

===================

RAM available:768 bytes, used:42 bytes (5.5%), free:726 bytes (94.5%), 

Heap size:726 bytes, Heap max single alloc:127 bytes

ROM available:16384 bytes, used:652 bytes (4.0%), free:15732 bytes (96.0%)







success



Return code = 0



Launching the programmer...

C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\tools\PPP\PPPv3.exe -cs 2 -chip PIC18F2431 -nogui "18f2421 test.hex"



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



Sending program...

Erasing the PICmicro

NOTE: EEPROM data will also be erased!

Writing program memory



.......



Writing configuration memory

Programming failed: <1><2><3><6>

That took 4.883 seconds



Return code = 0



FINISHED
[/b]
Not sure what <1><2><3><6> represents.
Is it <1> = top config line etc.

Would someone mind correcting my config settings please. I plan to use internal 8MHz osc.
Thank you.
I am using EB006 V7 programmer with ppp

Seems there was a similar problem, which was not resolved using a chip from the same family:
http://www.matrixmultimedia.com/mmforum ... 26&p=15850
Attachments
18f2421 test.fcf
(4.5 KiB) Downloaded 344 times
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Failing to program 18F2431

Post by Steve »

The problem seems to be with our PPP programming software and not the configuration data in your programs.

Strangely enough, it seems to affect the 18F2331 and 18F2431, but not the 18F4331. We're looking into this...

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Failing to program 18F2431

Post by Steve »

I've just had a look at the programming specification document for these devices and it says the following:
All power supply and ground must be connected, including AVDD and AVSS.
Perhaps the problem has something to do with this?

Can you please confirm which programming hardware you are using?

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

Re: Failing to program 18F2431

Post by medelec35 »

Thanks for your quick reply steve.

So my best bet for now would be to untick 'use external programmer to set configuration options'
and use '__CONFIG data' box if the form of:
0x300001,0x6
0x300002,0x9
0x300003,0x30
0x300004,0x3c
0x300005,0x9d
0x300006,0x80
0x300008,0xf
0x300009,0xc0
0x30000a,0xf
0x30000b,0xe0
Then program EB006 via ICSP and PicKit2?
Martin

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

Re: Failing to program 18F2431

Post by medelec35 »

medelec35 wrote:I am using EB006 V7 programmer with ppp
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Failing to program 18F2431

Post by Steve »

You could try using PICkit2 - I'd be interested to see if this works, but it oculd be the actual hardware (i.e. the EB006) because this may not set the analogue power lines appropriately.

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

Re: Failing to program 18F2431

Post by medelec35 »

steve wrote:I've just had a look at the programming specification document for these devices and it says the following:
All power supply and ground must be connected, including AVDD and AVSS.
Perhaps the problem has something to do with this?
Thanks Steve it was indeed to do with Avdd. To be able to program pin 7 must be at 5V. Avss is already connected to 0V. Is there a way of automatically getting programmer to put pin 7 and +5V when 18F2431 is selected, by altering a file within program directory?
Martin

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Failing to program 18F2431

Post by Steve »

Unfortunately, this is a hardware issue and there is no software fix.

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

Re: Failing to program 18F2431

Post by medelec35 »

Thanks anyway. It is not really an issue. To resolve problem, I have a single core wire from +5V pushed into a empty IC socket that's connected to Avdd of chip to be programmed.
Note to self: Read datasheet if chip fails programming :p
Martin

Post Reply