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.

asked Dec 2, 2018 at 5:25
\$\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\$ Commented 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\$ Commented 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\$ Commented Dec 2, 2018 at 5:49
  • \$\begingroup\$ @Jasen It has power, and the logic level is correct: 3.3V \$\endgroup\$ Commented Dec 2, 2018 at 5:52
  • \$\begingroup\$ It would be helpful if you'd share the schematic. \$\endgroup\$ Commented Dec 2, 2018 at 9:00

1 Answer 1

1
\$\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.

answered Dec 2, 2018 at 22:41
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.