Page 1 of 1

Failing to program 18F2431

Posted: Thu Nov 26, 2009 10:11 pm
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

Re: Failing to program 18F2431

Posted: Fri Nov 27, 2009 8:08 am
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...

Re: Failing to program 18F2431

Posted: Fri Nov 27, 2009 8:17 am
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?

Re: Failing to program 18F2431

Posted: Fri Nov 27, 2009 8:26 am
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?

Re: Failing to program 18F2431

Posted: Fri Nov 27, 2009 8:30 am
by medelec35
medelec35 wrote:I am using EB006 V7 programmer with ppp

Re: Failing to program 18F2431

Posted: Fri Nov 27, 2009 8:43 am
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.

Re: Failing to program 18F2431

Posted: Sat Nov 28, 2009 2:20 am
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?

Re: Failing to program 18F2431

Posted: Wed Dec 02, 2009 11:24 am
by Steve
Unfortunately, this is a hardware issue and there is no software fix.

Re: Failing to program 18F2431

Posted: Wed Dec 02, 2009 1:06 pm
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