PDA

View Full Version : PIC18f4220



jcullins
- 20th March 2006, 00:29
I am trying to program the pic18f4220a chip and get the error message
code programming error at 0000.
Is there an example using this or any other pic18f chip ?
Thank you
Jim

jcullins
- 20th March 2006, 00:35
I forgot to add I am using
Pic Basic Pro ver 2.46
MeProg ver 3.3
micro studio plus 2.3

Ioannis
- 20th March 2006, 08:40
Is there a MCSP 2.3 version?

On their site is only 2.2.1.1

Ioannis

jcullins
- 20th March 2006, 14:54
Yes, you should be able to down load it.
Have you programmed the PIC18f4220 ?
I have an example file form MELabs that compiles
but when I try to program it it comes up with "code error at 0008"
I am wondering if it is my 40 pin ZIF socket on my programmer.
Is there one just for the 18f series . Mine is the one I have used
with the pic16f877 chips.
Thanks
Jim

jcullins
- 29th March 2006, 18:44
Is there anyone out there using this chip ?
I don't seem to get a response from anyone.
I think my problem is with the assembler MPASM but not having used it
before I don't know.
I compile with PBP it is OK
assemble with MPASM OK
try to program with the MELabs serial programmer and it give this error

code programing error at 0000

or somethin like that.
Is this a set up problem?
Jim

sougata
- 29th March 2006, 18:56
Hi,

Normally all Program memory location are default $FFFF (nop). So you can check your PIC if it reads okay. If it reads $0000 then its your programmer. What a programmer does is dump the hex files in the prog. memory locations and just verifies it while/after programming. In most cases if your first location is not being programmed then your programmer has some communication error with the PIC. Even parasitic capacitance on the data and clock lines make it worse.

paul borgmeier
- 29th March 2006, 22:57
jcullins,

I do not use the EPIC so I cannot say - however, from MELabs website

http://www.melabs.com/support/epicfixs.htm


snip ....

#1 Most Encountered Problem - Power Supply

The most common cause of programming problems is low power supply voltage. We highly recommend the use of an AC Adapter. Batteries become depleted very quickly, causing program errors ("Code Programming Error at 0000").

... end snip

Good Luck,

Paul Borgmeier
Salt Lake City, Utah
USA

jcullins
- 31st March 2006, 22:37
The programmer works fine with the PBP compilier. I program the 16f series all the time with no problem. But it shifts over to the Mchips assembler.
I assembles with no errors but just want program.
Thanks for you help guys.
Jim

TomM
- 1st April 2006, 02:10
Have you seen this?

http://www.melabs.com/support/cap_mod.htm

I've also had some intermittent problems with the serial programmer and 18Fxxxx parts. I just ran across this note the other day and haven't had a chance to try it yet. A shorter cable to the socket also seems to help.

Ron Marcus
- 1st April 2006, 15:23
I've found that too much capacitance on the B+ line will cause errors with the serial programmer. Powering up the circuit may help. Likewise, if there are any loads on the programming pins of more than a mil, the programmer will read an error. If you have a pinned version, try programming by itself first as a loose part. If that works, then it is a circuit level issue.
A large, powerful magnet wrapped in a layer of tin foil held about an inch above the chip while programming, may help, but be sure there are no cats in the room(or wet them down) due to static EMD problems. The last solution will work only on today's date.

Hope some of this helps,
Ron

jcullins
- 2nd April 2006, 14:29
Thanks Guy,
I will try the .1 however I am programing DIP parts by incerting them in the programer and not using the ISP plug.
I am also using the wall wart. It programs the 16 series very well.
I will let you know if it works
Jim

jcullins
- 3rd April 2006, 03:28
Thanks a bunch guys
The cap and the software patch fixed eveything.
Thanks for you help
Jim