ATMEGA328PB program from Atmel Studio using MPLAB Snap

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

I am trying to program the 328PB on my 328 explained mini board using the MPLAB Snap programmer instead of the Debug on the Explained. I made an adapter from the 8 pin header on the Snap to the 6 pin header on the explained mini. When I try to configure the MPLAB Snap, I get the message:

 

The tool is in ht PIC mode now, it should be switched to AVR mode before connecting to AVR devices. Do you which to switch to AR mode?

I click Yes.

I get Communication switch mode timeout.

I click OK

Then I get

 

MPLAB Snap firmware must be updated before continuing

Version 0.00 to 0.00

Upgrade it grayed out

Click close

 

Rinse and repeat.....

 

 

JJO

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

Disconnect the 6 pin cable from the target and try again.

 

Jim

IIRC, you must first use the snap with mplab X first, then it will work with AS7

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Wed. Jul 1, 2020 - 08:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I made the modifications suggested on various sites for the Snap to AVR. I also removed the 4 resistors on the explained boards that connect MOSI, MISO, SCK and /Reset from the Debug to the 328BP in case the Debug drivers were not being turned off. Has anybody actually gotten all of this stuff to work?

 

I loaded MPLAB X IDE and imported my project. It compiled and I tried to load it into the explained 328BP.

 

It says it has found the Snap. 

Data transmission failed. Error code -10121 returned while trying to receive USB data.

A communication error with the debug tool has occurred. The tool will be reset and should re-enumerate shortly.
Connection Failed.

 

Launching
Could not connect to tool hardware: snap, com.microchip.mplab.mdbcore.snap.SnapToolImpl
The debugger could not be started.  Terminating debug session.
User program finished
 

JJO

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

My experience is that fresh-from-fab Snaps have to first attempt to connect to a PIC device, and then it will work with an AVR afterwards.

So make a dummy project and attempt to program a PIC.  Worth a shot.