Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Fusebits problem in atmega 1284p

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
shahidmk

Bascom Member



Joined: 03 Sep 2010
Posts: 16

blank.gif
PostPosted: Sat Apr 23, 2011 9:05 am    Post subject: Fusebits problem in atmega 1284p Reply with quote

I seem to be having a problem setting fuses up for an atmega1284p
the 1284p has a 20MHz external crystal. If I try to set up the low fuse to anything but internal osc. settings. The avr bricks... the lock bits are set. and I have to use avr doctor to do a complete reset. I have two 1284p's and they both come up with this error. I have plugged in a 324p in the circuit and it works fine. I am able to set the low fuse to D7 no problem.. I am stuck as to why it happens. I am using avrdude to program the avr.

any and all help and ideas are welcome.

cheers
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 863
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Sat Apr 23, 2011 9:59 am    Post subject: Reply with quote

Some crystals do not start right. Try different load capacitors.
The datasheet of the crystal should have the right value (also depends on the length of connection to the crystal and caps).
If all fails then use an oscillator (for your supply voltage).
I use oscillators now because of problems with mostly smd crystals.
Hubert
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5093
Location: Holland

blank.gif
PostPosted: Sat Apr 23, 2011 2:23 pm    Post subject: Reply with quote

you did not write which programmer you used?
And which version?
If the clock freq. is set too high, you can get problems.
Most chips run at 8 mhz osc with an 8 divider enabled.
This results in a 1 mhz clock. Since you may use a quarter, you can use max 250 Khz for the clock.

when you select the wrong fuse byte setting, only an external clock can help. and in some cases, only parallel programming will help.

_________________
Mark
Back to top
View user's profile Visit poster's website
shahidmk

Bascom Member



Joined: 03 Sep 2010
Posts: 16

blank.gif
PostPosted: Sat Apr 23, 2011 6:59 pm    Post subject: Reply with quote

@hubert.. the thing is that if I replace the 1284p with the 324p in the same circuit all is well... and I can program the Low fuse... I have even tried a 644p in the same circuit. and that seems to work fine as well.. its only the 1284p that is causing me a headache.. I had two 1284p that gave me the same result.. so today I went out and bought another .. and again that one bricked up after I tried to set the low fuse value. I had to reset the avr using avr doctor. for this reason I do not think that there is a problem with the crystal startup .. otherwise I would have had the same issue with the 324p and the 644p....

@albert. I am using a stk200 type programmer and using latest version of avrdude to program the avrs... I was using ponyprog (and still do) but couldn't use that in this case as it does not support the atmega1284p.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5093
Location: Holland

blank.gif
PostPosted: Sat Apr 23, 2011 8:39 pm    Post subject: Reply with quote

I advise to try with bascom's stk200 programmer.
_________________
Mark
Back to top
View user's profile Visit poster's website
shahidmk

Bascom Member



Joined: 03 Sep 2010
Posts: 16

blank.gif
PostPosted: Sun Apr 24, 2011 7:34 am    Post subject: Reply with quote

@mark,
thanks I will try the bascom programmer to try to program the fusebits an report back...

ust out of curosity can the onfiguration files used by the programmers used contain an error as most of them use the xml files from atmel. I have read a few posts on the net indicating differences between the atmel supplied ocumentation and the atmel supplied xml configuration files. wher the later one was incorrect.....
Back to top
View user's profile
shahidmk

Bascom Member



Joined: 03 Sep 2010
Posts: 16

blank.gif
PostPosted: Mon Apr 25, 2011 6:32 am    Post subject: Reply with quote

@Mark,
just tried programming the fusebits using bascom's programmer. The first time around I can program the fusebits with success but when I tried to read them again I got the READLB error and the avr was bricked. So I had to reset that usng HVP. I tried a 644p and a 324p and both worked fine...
I am back to square one.......
Back to top
View user's profile
shahidmk

Bascom Member



Joined: 03 Sep 2010
Posts: 16

blank.gif
PostPosted: Mon Apr 25, 2011 8:29 am    Post subject: Reply with quote

Thank you all who helped me in their own way. I managed to get the problem solved with all your help.

It turns out that the 1284p is extremely touchy about the type of external crystal attached to it. After trying out a number of 20MHz crystals. Eventualy I found one that worked on the 1284p as well as all the other avr's.

The other good that has comeout of this is that I know my programmer is still reliable as it was on day one!. I learnt to use avrdude which I like..

So thank you again to all who helped me ....
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum