0
\$\begingroup\$

I have a new custom built PCB circuit incorporating an atmega256rfr2 chip. I really can't program the chip using AVRISP MK11 based programmer (Olimex brand). But it can program the Atmega328p DIP chip on breadboard.

Been trying for weeks with zero results. It writes "unable to enter programming mode". i am using Atmel Studio 7.

Connection is follows:

MOSI--------------->PDI(MOSI)
MISO--------------->PDO(MISO)
SCK---------------->SCK
RST---------------->RSTN

Help will be appreciated. Thanks in advance.

\$\endgroup\$
5
  • \$\begingroup\$ Did you try connecting MOSI on programmer to MISO on target and MISO on programmer to MOSI on target? Also, does the programmer have capability of programming your chip? You can check it from user manual. \$\endgroup\$ Dec 2, 2018 at 5:31
  • \$\begingroup\$ @RohatKılıç Yes, I tried swapping them with no result. And as for the programmer capability this is the reading from the datasheet: "AVR-ISP-MK2 is a ready-to-use programmer that behaves like Atmel AVRISP mkII. The board is suitable for programming microcontrollers that, according to their respective datasheets, have ISP, PDI, or TPI interfaces available for programming." So by these I guess it can. \$\endgroup\$
    – tmoeti
    Dec 2, 2018 at 5:37
  • \$\begingroup\$ the chip needs power during programming and you also need a ground connection, and the logic level of the programmer should be compatible with that of the chip. \$\endgroup\$ Dec 2, 2018 at 5:49
  • \$\begingroup\$ @Jasen It has power, and the logic level is correct: 3.3V \$\endgroup\$
    – tmoeti
    Dec 2, 2018 at 5:52
  • \$\begingroup\$ It would be helpful if you'd share the schematic. \$\endgroup\$
    – mnhjansson
    Dec 2, 2018 at 9:00

1 Answer 1

0
\$\begingroup\$

Thank you everyone, I finally managed to program it. It turns out that in the custom PCB I made one of the stitching vias was placed on top of the MISO trace, so it was always on ground. I did cut that line with a knife and it programmed with success. Your comment did help point me to the right answer.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.