Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ahmed34234
PostPosted: Apr 18, 2012 - 07:08 PM
Newbie


Joined: Apr 18, 2012
Posts: 11


Hello,

I am trying to program newly bought ATMEGA1284p with miniAVR StK500 Programmer in AVR Studio 4.

"Read Signature" is OK.
Erase is also OK.

But when I try to program a hex file or setting a fuse bit; then i get verification error in both cases. I also unchecked verification box and READ the written hex file which shows all FFFF...'s means hex file was not written.
Also I have not been able to Program it since the time I bought it, so all the fuse settings are DEFAULT.

The Programmer is working Fine for ATMEGA16.
Does it means that my micro-controller is dead ? if so, can it be revived ?

Any suggestion is welcomed...
Thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
MBedder
PostPosted: Apr 18, 2012 - 07:21 PM
Raving lunatic


Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia

Erase the chip, switch the power off and on again - you have probably set the protection fuses.

And please delete your other (duplicate) post while it hasn't been replied yet.

_________________
Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
 
 View user's profile Send private message  
Reply with quote Back to top
meslomp
PostPosted: Apr 18, 2012 - 08:09 PM
Raving lunatic


Joined: May 02, 2007
Posts: 3007
Location: Nieuwegein, Netherlands

what is your programming speed?

_________________
1)Datasheet and application notes checked?
2)tutorial forum
3)Newbie start here
 
 View user's profile Send private message  
Reply with quote Back to top
broodell
PostPosted: Apr 19, 2012 - 03:32 AM
Rookie


Joined: Feb 03, 2010
Posts: 33
Location: Minnesota USA

Try another AVR programmer? I have talked with others who have had issues programming the 1284P with some programmers.

I have programmed this chip with the ATMEL AVRISP mkii programmer with no problems.

Someone was just telling me yesterday that they weren't able to program the 1284P with the USBTinyISP programmer (they said that this could only program 64k Flash max devices). I've never used this programmer, so I can't speak from personal experience. Can someone else please verify/refute this????

_________________
Beau
www.goEWS.com (Wireless Modules/Breakout Boards -and- AVR Breakout Boards)
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 08:10 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

ISP programmers obviously need to be physically able to connect to the actual hardware SPI, TPI, PDI, JTAG interface.

So if you have an SPI type programmer, you should be able to program any AVR which allows SPI programming. However the software needs to know about any new chips.
e.g. avrdude5.10 knows about ATmega1284P but was released before ATmega1284 was ever made.

So if you use a modern avrdude or Studio version, you should be able to program your AVR.

Difficulties arise with Indian or Chinese programming software. They tend to only 'know' old-fashioned AVRs, and have no method of adding 'new' devices.

I have no idea what 'miniSTK500' may be. With luck, it will work with Studio4.19 or avrdude.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 09:31 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


The ISP Frequency is 5.946KHz.
I also tried to program my atmega1284p via ponyser programmer through serial cable and same error comes.
My programmer is currently only working with avr studio 4 and studio 5 cannot detect it. Maybe the firmware is old.
 
 View user's profile Send private message  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 09:36 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


http://www.sure-electronics.com/goods.php?id=982

This is the programmer I am using and sadly it does not have ATMEGA1284P listed in the compatible devices. Neutral
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 09:43 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

I would put serious money on your Sure programmer working perfectly well with Studio4.19

I suspect that you have inadvertently altered the clock fuses. Read Cliff's tutorial.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 10:04 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


I am not able to detect any incorrectly configured fuse bits here:
Screenshot attached.



Please verify...
Thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 10:12 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

Everything looks absolutely fine to me.

Go to the Main tab, and read the signature.
Then you can go to the Programming tab.
Erase the chip, and program the Flash.

Let us know how you get on.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 10:15 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


Read Signature Gives:

Entering programming mode.. OK!
Reading signature .. 0x1E, 0x97, 0x05 .. OK!
Leaving programming mode.. OK!

Erase gives:
Entering programming mode.. OK!
Erasing device.. OK!
Leaving programming mode.. OK!

But Program command gives:
Getting isp parameter.. SD=0x19 .. OKOK
Reading FLASH input file.. OK
Entering programming mode.. OK!
Programming FLASH .. OK!
Reading FLASH .. OK!
WARNING: FLASH byte address 0x0000 is 0xFF (should be 0x0C).. FAILED!
Leaving programming mode.. OK!
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 10:25 AM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

What version Studio are you using? v4.18 or v4.19 should work fine.

That seems strange. In the Main tab, set the ISP frequency to 125kHz or similar.

Try again.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 10:28 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


I am using AVR Studio 4.13, downloading 4.19 right now. Lets see how it turns out :anxious:
 
 View user's profile Send private message  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 10:46 AM
Newbie


Joined: Apr 18, 2012
Posts: 11


ahmed34234 wrote:
I am using AVR Studio 4.13, downloading 4.19 right now. Lets see how it turns out :anxious:


AVR Studio 4.19 cannot recognize the AVR ISP device now. I was using Studio 4.13 earlier.
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 02:26 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

How does your Sure programmer appear to the PC?

I guess that it just looks like a normal COM port.
So you select COM4 or whatever COM# it uses, and tell Studio4.19 or Imagecraft or CodeVision or avrdude or ...

It should work perfectly with all AVR software ever invented. (except perhaps Studio5)

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ahmed34234
PostPosted: Apr 19, 2012 - 03:19 PM
Newbie


Joined: Apr 18, 2012
Posts: 11


Programmer is now working with AS 4.19, rest is same.
Can you choose one of the following possibilites:
1. Is the microcontroller dead ?
( because I also tried the ponyser programmer before this programmer and I faced exactly the same error in avrdude through serial programmer.)

OR

2. Programmer does not support ATMEGA1284P ?
( as it is not enlisted in the page of sure electronics http://www.sure-electronics.com/goods.php?id=982
and it is programming other microcontrollers okay. Plus the signature/hex/fuse of ATMEGA1284P is read okay. Problem is in the writing.)

BTW can a mircocontroller be rendered as dead if its signature matches the device signature?)
 
 View user's profile Send private message  
Reply with quote Back to top
david.prentice
PostPosted: Apr 19, 2012 - 03:47 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16271
Location: Wormshill, England

Please read Signature, fuses, lockbits and report back.

Yes. You can get a good Signature with a dead chip. If you wear out the Flash with continuous SPM commands.
It is very unlikely that your ATmega1284P is dead.

OTOH, I would not trust PonyProg with anything.

If you say which country you live in, there may be a neighbour who can try the ATmega1284P in a STK500.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits