Problem programming ATMEGA328P

Mr Crusty
 
Avatar
 
Subject:

Problem programming ATMEGA328P

 · 
Posted: 10.03.2012 - 18:20  ·  #1
Hi Rolf,
I am using ISP3-USB with firmware 4.02 HW : 1.01 update 111021

I have been trying to programme a ATMEGA328P and keep getting the error message
"Wrong device-ID : 1E950F MEGA328P expected".

Same ATMEGA328P when ID read by Atmel STK500 development kit.
Gives signature as Ox1E Ox95 Ox0F and confirms as ATMEGA328P

Substituted 328p for ATMEGA168P in the same circuit and recompiled code for ATMEGA168P
ISP3-USB loaded as expected.

Is it a bug or am I doing something stupid?

Best
Mr Crusty
:(
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: Problem programming ATMEGA328P

 · 
Posted: 10.03.2012 - 20:36  ·  #2
Hi Mr Crusty,

I assume the fuses of the ATMEGA328P are actually set to use a low frequency
source (CKDIV8 set ?) and now the AVRco clocks the SPI too fast.

1. compile the projet with setting:
ProcClock = 500000; //test with 500kHz
or use
SPIclk = 500000; in the "Define_Fuses" section.

2. program the correct clock fuses (at that low speed)

3. redo the changes above and try again with your speed.

HTH
Gunter
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem programming ATMEGA328P

 · 
Posted: 10.03.2012 - 22:30  ·  #3
and also check this:
Attachments
Problem programming ATMEGA328P
Filename: ID.jpg
Filesize: 55.37 KB
Title:
Download counter: 47
Mr Crusty
 
Avatar
 
Subject:

Re: Problem programming ATMEGA328P

 · 
Posted: 11.03.2012 - 12:35  ·  #4
Gunter, Rolf,

Thanks for the speedy help and information.

Gunter, followed your suggestions and the code is now being downloaded to the chip.

Very much appreciate the help

Best

Mr Crusty :-) :-)
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 16 · Cache Hits: 15   76   91 · Page-Gen-Time: 0.026511s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI