View previous topic :: View next topic |
Author |
Message |
wimapon
Joined: 26 Oct 2008 Posts: 24 Location: Meedhuizen

|
Posted: Mon Mar 16, 2015 9:16 pm Post subject: problems with atmega128 and avr studio 4 |
|
|
Hi folks,
I can not program my atmega128 with avr-studio 4.
I bought a few boards with an atmega128 on it and with a isp program connector
and a 8 MHz Cristal.
One works perfect, but with an other one i was playing with the avr-studio 4
features. i choosed to use an External Xtal with high frequency.
After that excersise i always get the next info, and the program does not work
in the atmega128:
the programming goes okay, but the verifying goes very slow or i get the message:
verifying failed: Adress 0x0000, expected: 0x940c, receive:0xffff
How can i get to normal operation with that atmega128?
Again, i use other ( the same sort) boards for other programs, and they work
perfect.... only this one i can not program anymore.
when i use the advanced menu of studio 4 tools i get with a working atmega128:
int Rcosc.freq: 8Mhz
startup 64 ms + 6 ck
bootblock 4096 words
device sign 1E 97 02
target sw rev = 3.8
calibration type 0xA4
with the problem atmega128 i get: ( and i can not change it)
int Rcosc. freq: ext.Xtal high frequency
startup 64 ms + 6 ck
bootblock 512 words
device sign FF FFFF
target sw rev = 3.8
calibration type 0xff
Please, can anybody help me?
Wim |
|
Back to top |
|
 |
albertsm
Joined: 09 Apr 2004 Posts: 5736 Location: Holland

|
Posted: Tue Mar 17, 2015 10:21 am Post subject: |
|
|
this has been discussed many times before.
basically, you have chosen the wrong oscillator so now the micro is expecting a clock signal from an external oscillator.
to solve it, apply a clock signal to the xtal input pin, then select the proper oscillator.
you could use a ttl generator or the clock output of another working circuit, a 555, etc. for the clock signal. _________________ Mark |
|
Back to top |
|
 |
wimapon
Joined: 26 Oct 2008 Posts: 24 Location: Meedhuizen

|
Posted: Tue Mar 17, 2015 10:29 am Post subject: |
|
|
Hi Albertsm,
Okay now i understand what is happening.
Thank you very much,
I will do the extern signal.
i will let you know here.
Wim |
|
Back to top |
|
 |
wimapon
Joined: 26 Oct 2008 Posts: 24 Location: Meedhuizen

|
Posted: Tue Mar 17, 2015 1:43 pm Post subject: |
|
|
Okay Mark,
Problem is solved now. I put a 0.5 MHz 6 Volt top top signal generator to xtal1 pin and then
wrote with studio 4 the internal oscillator to the avr.
so... i am very glad.. again thank you very much albert!!
Wim |
|
Back to top |
|
 |
|