Basic wiring of ATxmega64D4

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

Hi there,

 

I'm quite new in the world of MCU so be gentle :)

I played around with arduino of course but I thought I move on and try some more native approach. I have an AVRISP MKII compatible programmer and recently bought an ATxmega64D4 but unfortunately the Atmel Studio 7 is not able to even read the device id. The programmer itself is working, the AS recognize it and I was able to program ATmega328P, ATmega32U4 and ATTiny85. Yeah all of them are useing ISP. It's a hungarian product so the manual is not available in English, but maybe the drawings are understandable :) http://www.elmodules.hu/data/pro...

So back to topic. I connect pin 8,18,30,38 to GND and the 9,19,31,39 to 3.3V. I connected DATA to 34 and CLOCK to 35. I start with this basic wirings.

The AS didn't recognize it, so I tried to add some pull-up to the reset pin: 2k2 and 10k, but still no luck. What do I missing?

The power source is a simple bread board power shield (I'm not added decoupling caps, I thought because of the basic operation - read the id - I do not need them). I checked the voltage and it's ok.

Any help would be appreciated.

 

BR,

Peter 

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

You told us about your chip connections, but not the programmer connections, how is it connected to the programmer.

Please post a picture of your breadboard layout.

BTW, what makes you think the bypass caps are not needed? 

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

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

Welcome to the Forum.

 

As Jim mentioned, please post a photo of your setup, and a schematic of your actual circuit, including the programming connections.

 

Use the Mountain Range Icon, two icons left of the smilie face, to post an image.

 

Next, you know, I hope, that Xmegas are 3 volt chips.

5 V will destroy them instantly.

 

The product manual shows programing a Mega using ISP.

You, for the Xmega, will need to use the PDI interface, (not shown in the manual).

 

Although AS.7 will likely recognize your micro, your programmer may or may not.

Track down a data sheet for your version of the programmer and make sure it supports both PDI programming, and your specific micro.

 

You DO need the by-pass caps.

Connecting to the micro and reading the chip's signature require the micro to be operational and running, no different than running a flash-the-led program.

By-pass caps are required for reliable operation.

 

For the Xmega remove the external pull-up resistor on the Reset\ pin.

 

JC 

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

Hi. Sorry for the late answer. The caps. When I played around with the raw atmega328p mcu the functions worked without bypass caps, so I thought this one works as well.

I uploaded the pictures. I hope You meant these kind of pictures.

There are 2 switch and a jumper which I can set the voltage. I set all of them 3.3V but there is a possibility when I switched back and forth between a pro micro and this, that one of them remained on 5V. You mentioned 5v is instant brick?

I'm now assemblying another order and order 2 more of this. So You say there is only need the powers (with bypass) and the data+clock lines to program this? 

 

Attachment(s): 

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

 I am reasonably certain you have checked this, however, I can not see pin 1 indicators on the programming connector(s) for either PDI or TPI.

Are you "sure" that the pins 3 & 5 of the PDI connector are shorted on the board (the pink and yellow wires in your photos)?

 

Note, you should only need to use one of those wires to connect to the uC.

David (aka frog_jr)

Last Edited: Wed. Jan 24, 2018 - 09:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I copied the "schema" of my programmer from its documentation:

It says I have to short pin 3&5. The other difference is this board can supply power to the uC (max 50mA-3.3V or the max provided from USB in case of 5V) so I set it to both 3.3V and 5V and measure it with a DMM.

One additional note. If I didn't attach the data port to a wrong place or not connect at all it resulted different error when it was connected to the correct place. I packed my stuff for today but if You're interested, tomorrow I'll setup the board again and send the error codes (however they are pretty general, I googled them).

When I got the new ones I test them again to confirm the programmer is working and I probably burned my uC...

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

In addition to re-checking the programming cable connections:

 

I'd tac down a by-pass cap or two on the PCB, and put another one on each of the power rails.

 

Next, verify that the little breadboard power supply actually connects Ground and V+ on both sides, (and, obviously, that it is set for 3 - 3.3 V).

 

Next:  SOME breadboards have the power rails split in the middle of the breadboard, so the long power rails are not continuous.

Verify that the power rails are continuous, or you will have to put 4 small jumpers on the four power rails, in the middle of the board.

 

The photo below shows a couple of small jumpers connecting the two halves of the power rail on the breadboard.

 

JC

 

 

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

In the meantime just came to my mind, if it possible that it came from factory with setting to use external crystal? The full name of the item was ATXMEGA64D4-AN. I’ll try to attach a 16mhz at home...

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

Unfortunately that won't be the problem.

 

All Xmega's start up on the internal 2 Mhz (IIRC) RC Osc.

 

One then uses code to select from the numerous clock sources, set the PLL to set the frequency, etc.

 

So any Xmega should power up and respond to the programmer.

 

The only way to "Brick" an Xmega that I am aware of is to set the Brown Out Detector, via Fuses, to a value higher than the operating voltage.

 

Assuming you didn't zap the chip with 5 V, I'd look again at the PDI interface wiring, in case you mistakenly have it hooked up inverted / backwards / whatever.

 

JC

 

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

DocJC wrote:
...  and a schematic ...
Only a few XMEGA D4 boards that I'm aware of.

Couldn't locate an XMEGA D schematic checklist; these exist for XMEGA A, C, and E.

 

MattairTech LLC

MattairTech

Development Boards

MT-DB-X4 Atmel AVR XMEGA 44-pin AU/A/C/D USB development board (ie: ATxmega128a4u)

https://www.mattairtech.com/index.php/development-boards/mt-db-x4.html

https://www.mattairtech.com/index.php/catalog/product/gallery/id/26/image/114/ (schematic)

https://www.aliexpress.com/store/product/ATMEL-ATxmega32D4-development-kit/800571_374356782.html

via http://www.mcuzone.com/SHOP/?link-showList.html (Mcuzone, links)

https://www.avrfreaks.net/forum/xmega-development-boards

http://www.microchip.com/wwwproducts/en/atxmega128d4

 

Edits:  +2 URL, schematic checklist

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 25, 2018 - 03:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, look vary closely at the programmer PCB.

See if there is any mark on the top or the bottom indicating Pin #1 on the programming header.

 

Use a DMM, (Ohm-meter), and make sure that what you think is pin 6, Ground, is actually connected to the Ground bus on the programmer.

This is to confirm that you do not have the PDI orientation 180' backwards.

 

Where are you located in the world?

 

Perhaps another Freak could put your board on another programmer and see if it works?

 

JC

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

Hey! Sorry for the late answer, but I didn't have time and only got the atatmel ice yesterday.

So. One of the xmega was zipped :( I'm able to read the id of the device but I couldn't flash it.

The other one is work perfectly :)

So it seems my 3rd party programmer don't handle PDI or at least this version of the protocol.

Cheers!