View previous topic :: View next topic |
Author |
Message |
shahidmk
Joined: 03 Sep 2010 Posts: 16
|
Posted: Sat Apr 23, 2011 9:05 am Post subject: Fusebits problem in atmega 1284p |
|
|
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 |
|
|
hgrueneis
Joined: 04 Apr 2009 Posts: 902 Location: A-4786 Brunnenthal
|
Posted: Sat Apr 23, 2011 9:59 am Post subject: |
|
|
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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Apr 23, 2011 2:23 pm Post subject: |
|
|
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 |
|
|
shahidmk
Joined: 03 Sep 2010 Posts: 16
|
Posted: Sat Apr 23, 2011 6:59 pm Post subject: |
|
|
@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 |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Apr 23, 2011 8:39 pm Post subject: |
|
|
I advise to try with bascom's stk200 programmer. _________________ Mark |
|
Back to top |
|
|
shahidmk
Joined: 03 Sep 2010 Posts: 16
|
Posted: Sun Apr 24, 2011 7:34 am Post subject: |
|
|
@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 |
|
|
shahidmk
Joined: 03 Sep 2010 Posts: 16
|
Posted: Mon Apr 25, 2011 6:32 am Post subject: |
|
|
@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 |
|
|
shahidmk
Joined: 03 Sep 2010 Posts: 16
|
Posted: Mon Apr 25, 2011 8:29 am Post subject: |
|
|
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 |
|
|
|