ATMega644 Startup Question

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

I just got an ATMega644 (DIP version) to experiment with making my first standalone microcontroller project... and as a first experiment just wanted to try programming it using my AVRIce MkII JTAG with a simple program... but I keep getting the "no recognized target device found" message from AVRStudio. Then it asks if I want to try programming the JTAG enable fuse using ISP... and I have been hitting "no" because I'm not even sure which pins are the ISP pins or if my AVRIce MkII has an ISP cable... Do I need to do this? Does it not come from the factory with the JTAG enable fuse set? I haven't yet connected my external crystal... does that matter? I thought it would just use the built-in crystal if I don't have the external one present and haven't selected the external crystal fuse bits. Oh, and one more question... on the JTAG connection... what is the difference between VTref and VTG? Or Vsupply? Are these all the same thing? I just have them all routed to 5V right now...

As always... any comments or suggestions would be greatly appreciated...

Thanks,
James

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

Quote:
try programming it using my AVRIce MkII JTAG with a simple program
You need a JTAG ICE MK2 or a Dragon, the AVRIce MkII sounds as if it is a JTAG MK1 with a nice sounding name which does not support the M644.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Okay, I actually have it working now... I mis-spoke on the name of my programmer. It is the Atmel AVR JTAG ICE MK2. It turned out that I had two of my JTAG wires crossed... Once I noticed that, I was able to view its fuse bits, program it, etc... I unprogrammed the "clock divide by 8" fuse so it will run at 8Mhz using its internal RC oscillator. I purchased a 16 Mhz oscillator for it to use externally. Is there any polarity on these crystals, or does it not matter which way you connect them? Also, if you can live with running at 8Mhz, do you really need the external oscillator and two capacitors... or is running with the internal oscillator fine?

Thanks,
James

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

Quote:
is running with the internal oscillator fine?
It's good for most things except when you start to play with things that need precise timing like the USART, then it is better to have a crystal.
The crystals have no polarity but you will need 2 caps also. When you connect the crystal then you will need to change the fuses, for 8 or 16 MHz you can use the very last one at the bottom of the list.
If you need a reference diagram for the crystal you will find a few on my website on the download page.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

When you say oscillator, do you mean "oscillator" or "crystal"? The words written suggest crystal, not oscillator.

If an actual oscillator was purchased, it will have at least 3 pins or contacts (power, ground, output). Only one pin connects to the micro and there are no external caps. Please verify what you have or it is not likely to work.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

Oh... I meant to call it a crystal. I bought a 16 Mhz crystal (with only two legs) to use with it and 20 pF ceramic capacitors to go with it. I just connected it all up on a protoboard and was able to program the thing with an empty program just as an experiment. I was also able to change the fuse bit to the bottom external crystal selection... and it all seems to be working. So far it's going easier than I thought it would... i.e. I just figured there would be something I'd done wrong and wouldn't even be able to program it... so I was just surprised to have it all work so far, let me debug, etc... This is really great to be working with my own board design now!!!

Thanks for your comments....

- James