Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

problems with atmega128 and avr studio 4

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

Bascom Member



Joined: 26 Oct 2008
Posts: 10
Location: Meedhuizen

netherlands.gif
PostPosted: Mon Mar 16, 2015 9:16 pm    Post subject: problems with atmega128 and avr studio 4 Reply with quote

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
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5076
Location: Holland

blank.gif
PostPosted: Tue Mar 17, 2015 10:21 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
wimapon

Bascom Member



Joined: 26 Oct 2008
Posts: 10
Location: Meedhuizen

netherlands.gif
PostPosted: Tue Mar 17, 2015 10:29 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
wimapon

Bascom Member



Joined: 26 Oct 2008
Posts: 10
Location: Meedhuizen

netherlands.gif
PostPosted: Tue Mar 17, 2015 1:43 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
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