3

I recently purchased an Arduino with an atmega1280 on it. I did not get it to use the Arduino IDE but just as a handy board to use with AVR Studio and my Dragon.

I purchased a new computer around the same time and it is running windows 7 64bit, I downloaded AVR Studio 5.1 and plugged in my Dragon. I upgraded to the latest firmware as it forces you to do. I then connected the Dragon to the Arduino and I get the following error:

[ERROR] Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00, ModuleName: TCF (TCF command: Device:startSession failed.)

I have verified the ribbon cable pinouts are the same on both ends and have continuity. Pin 1 goes to Pin 1 and so forth. AVR Studio can read the 5.0V on the sense line but that is it.

I then installed libusb-win (1.6.2.0) and used avrdude to get a more descriptive error: pasebin output

I have tried to wire up an atmega8 and atmega128 on breadboard with ISP and JTAG connections and I get the same errors as above but it makes more since so troubleshoot the PCB to PCB connection issue to eliminate any mis-wireings I may have.

Any idea where to start looking for the problem???

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
uMinded
  • 595
  • 1
  • 9
  • 21

1 Answers1

0

One thing is the power on the JTAG header, and another is on the actual chip. Could you try checking connections all the way from the AVR to the JTAG-pins? In my experience, there are almost always bad wiring, even if you think it is perfect. When that is not the case, the AVR is not getting power.

Are you trying ISP or JTAG or both? Does the AVR support JTAG? Is it ISP extracted from a JTAG connector?

Atmel's JTAGICE mkII documentation explains quite a bit of both ISP and JTAG. I just recently build a board with JTAG connection (http://www.avrfreaks.net/modules/PNphpBB2/files/display_105.png), which may be descriptive on how to connect your JTAG, and this I know is working ;)

chwi
  • 2,752
  • 2
  • 41
  • 66
  • The chip is an Mega1280 LQFP with every pin brought out to a 0.1" header. I cross referenced the Arduino build schematic to get the correct JTAG pins. (ACK - A4, TMS - A5, TDO - A6, TDI -A7) – uMinded May 22 '12 at 03:58
  • The board also has a factory ISP connector, I made sure it was wired to the AVR physically with a multimeter and I get the correct pins all the way to the dragons header. To make mention I am powering the Arduino by a walwart. – uMinded May 22 '12 at 04:00
  • What error do you get when trying to program with JTAG? And with A4,5... Do you mean portA or analog4,5...? – chwi May 22 '12 at 08:04
  • Arduino [pin numbers](http://arduino.cc/en/uploads/Main/arduino-mega-schematic.pdf) A4-7 are the JTAG pins. [HERE](http://pastebin.com/a1jWSh6h) are my errors – uMinded May 22 '12 at 11:03
  • Since Arduino is using these pins for ADC purposes, I think that JTAGEN fuse is disabled, i.e you can not use JTAG before the fuse is set. And when I think about it, maybe Arduino also disables ISP interface so people can not brake the bootloader without knowing so? – chwi May 22 '12 at 14:37
  • I have no doubt that the JTAGEN fuse is not set but I figured to give it a try. The boards have ISP so I would have thought the ISPEN fuse was set but you never know... What I know for sure is I have loaded a program that has this string "!!!" and the current bootloader has a "hidden hardware monitor" which is completely useless and as it loads my program into memory to run it boots itself into the monitor then the wdt restarts it and its stuck in a loop. I have no idea how else to get the dang thing un-stuck. Any ideas? – uMinded May 23 '12 at 04:35
  • Unfortunately, I have never used Arduino my self since I feel that I am loosing all control over my design. [DebugWire](http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRDragon/AVRDragon_connecting_to_target_through_the_debugwire_interface.htm) could be the way to go, but I don't know if it is possible before enabling it with ISP. Maybe as a last resort you could try HighVoltage programming? I'm all out of ideas – chwi May 23 '12 at 10:09
  • I usually don't get prefab boards for the same reason but I figured having a 1280 that I knew worked would be handy. Seems I was wrong. I just looked into parallel programming and guess what, three of the pins needed are not on header on Arduino. I might solder on some wiskers or just put it in a drawer. – uMinded May 25 '12 at 04:06
  • could you provide some information about parallel programming? so the problem was wiring after all? – chwi May 25 '12 at 07:24
  • no wiring problem. The Arduino Mega boards break out all but about [13 pins](http://arduino.cc/en/uploads/Main/arduino-mega2560_R3-schematic.pdf) on the QFP package. Three of those pins are needed to use [HVPP programming mode](http://127.0.0.1:47873/help/1-3384/ms.help?method=page&id=AVR_DragonUserGuideavrdragon_pp_description&product=AVRStudio&productVersion=5.1&locale=EN-US#avrdragon_pp_description). – uMinded May 26 '12 at 22:56
  • The last link was at localhost, can't reach that – chwi May 29 '12 at 18:25