How to used two ATmega 128s Simultaneously....??

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi there,

we r not able to program one of the two 128s that we are using simultaneously :(....any valuable suggestions would really be appreciated.... :)

"Both the Atmega's working one the 16MHz external crystal."

Best Regards,

hgaurav and bdhanu

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're going to have to help us a bit more than that. What exactly are you trying to do?

Christopher Hicks
==

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Christopher,

Actually we are using one ATmega(hereafer 'A') to control the MMI peripherals and with the other Atmega we have interfaced FPGA(hereafer 'B').The A is getting programmed. Everything other(Hardware related) seems to be ok.

Regards
hgaurav and bdhanu

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hgaurav and bdhanu,

Can I suggest you go back to your original post - pretend you know NOTHING about the problem, read the post and then consider how YOU would go about trying to answer it?

Hopefully you'll spot that it would be quite impossible. All you've told us so far is "not able to program one". Nothing about what programming software you are using, nothing about what programming interface, nothing about how the electronics are wired and most importantly nothing about what IS happening or any error messages or odd behaviour you may be seeing.

It's a bit like me saying to you something vague like "my car was making a funny noise this morning - what do you think it was?"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sorry all :( :(

That was unforgivable mistake from our part.

We are using AVRSTUDIO 4.12,MKII for programming,16 MHZ External Crystal for both the 128s. No odd behaviour was seen.Just "Flash Programming FAILED" kind of error message...please reply

Thanking you in anticipation.

Best Regards,
hgaurav and bdhanu

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you need to be a bit more systematic about this and gather together some more evidence and symptoms if you want to get anywhere.

It seems that you have one chip you can program, and one you cannot. A few things to think about:

*) Are the reset, power supply and clocks for both chips working correctly?

*) Swap the chips over (if they're in sockets). Is the inability to program linked to the chip or to the socket it is in?

*) Maybe the chip you cannot program is broken and needs to be replaced. Unlikely, but possible and quick and easy to test by replacing with a fresh one.

*) Maybe the chip you cannot program has got some fuses set inappropriately for the programming method you're using. Can you read and write the fuses?

*) Is the inability to program linked to the code in some way? If you can program CodeA into ChipA, but cannot program CodeB into ChipB, can you program CodeA into ChipB and CodeB into ChipA?

There's more, but that should get you started.

CH
==

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've not used a 128, but if you are sure the chip is not broken, try using low clock speed programming option. Since if it's not got fuse settings for external clock or using anything <10MHz internal clock, most programmers need to drop their SCK speed. Once you get in, you can probably set the fuses again.

Conrad Braam - www.softcircuitry.blogspot.com - www.plcsimulator.org
Always start off poorly, that way when you finally figure it out, you can get a few surprise hits in.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
"Both the Atmega's working one the 16MHz external crystal."

ONE crystal will get feedback from two amplifiers... I think that will not result into two correct working oscillators.

I suggest to let one AVR pass its crystal tuned clock frequency to the second AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hope this post is seen as a positive criticism. When you have a problem and ask for help, the more information you provide about what the problem is will greatly increase your chances of getting a useful reply. I have noticed there is a tendency for people who clearly do not speak English as an original language to fall into the trap of what I suspect is "The fear of making mistakes." Give as many details as you can. Your English does not have to be perfect. Why not even consider posting in English and your mother tongue?

Replies? Nur auf Deutsch bitte.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you trying to program both chips at the same time? That won't work as the MISO lines will probably interfere with each other.