MPLAB Snap

Go To Last Post
151 posts / 0 new

Pages

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

The current Microchip web site 404 offer :

...

 

50% off

Coupon Code: 404Discount

 

[BUY IT NOW button]

https://www.microchipdirect.com/product/search/all/mplab%20snap

via 404 | Microchip Technology

 

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

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

The coupons SPOOKY68 and 404Discount are not cumulative! I wanted Snaps with 100% discountcheeky

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

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

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

Microchip MPLAB PICkit 4/SNAP Cable Selection and Installation | Tag-Connect

...

Our soon to be launched new family of 8-pin TC2040 cables and solutions will support SAM, AVR, and MIPS. For more information or to be added to our notification list please ...

...

 

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

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

MPLAB Snap | Welcome to Microchip Technology | Microchip Technology Inc.

...

 

30% Off

Coupon Code

TP2023

Expires : 30-Sep-2020

 

...

 

More Info 

 

...

via Dev Tool Deals | Microchip Technology

 

edit 2-Sep'20 :

In Stock: 140

In Stock: 100

edit 12-Sep'20 :

In Stock: 82

edit 14-Sep'20 :

In Stock: 73

edit 16-Sep'20 :

In Stock: 44

edit 22-Sep'20 :

In Stock: 21

edit 23-Sep'20 :

In Stock: 19

edit 25-Sep'20 :

In Stock: 16

edit 29-Sep'20 :

Out of Stock

edit 30-Sep'20 :

In Stock: 2

 

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

Last Edited: Thu. Oct 1, 2020 - 12:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

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

stock is low

 

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

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

Has anyone been able to get the CDC UART to work? Apparently, this is a feature that's available when the SNAP is in AVR mode. A serial port shows does up on my computer, but there are no data on pin 7 or 8 when I'm sending data from the serial monitor.

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

Are you using the DTR signaling?

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

Not that I'm aware of? I was currently using the Arduino serial monitor. I know it's "dumb", but it pretty much always works. Does the SNAP require handshaking to function as a USB-UART bridge?

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

I think the same guidelines apply as for nEDBG/PKOB nano - the IO lines are tristate until a terminal connects and asserts DTR (user guide explains this).  Some terminals do this, some have a checkbox that needs checking.

Of course also remember to connect VTG as reference for those level shifters.

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

Of course also remember to connect VTG as reference for those level shifters.

This was the issue, thank you!

 

I took the time to update the SNAP firmware too. Damn what a stupidly complicated process. I first had to download MPLAB X (Why isn't this possible in AS7), then (according to a writeup @jeruud did here a while ago), create a PIC project, Install XC8, and then press a circulating arrow symbol in GUI. What happened to atfw.exe?

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

MCUdude wrote:
Damn what a stupidly complicated process

Totally agree :/

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

Release Notes for MPLAB® Snap
In-Circuit Debugger & Device (Non-Production) Programmer

MPLAB® X IDE v5.45

__firmware__

 

October 15, 2020

 

...

 

9       Virtual COM Port for AVR Devices

The Virtual COM Port is a general-purpose USB serial bridge between a host PC and a target AVR device.

The AVR-mode CDC implementation on the MPLAB PICkit4/SNAP Virtual COM port supports:

·Baud rates in the range 1200 bps to 500kbps

·Only 8-bit character format

·No hardware flow control

·One or two stop-bits

IMPORTANT NOTE: Connecting to the Virtual COM port from a terminal emulator will enable pins 7 and 8 on the MPLAB PICkit4/Snap header as TX and RX pins. This functionality is independent of the debugger functionality. You must ensure that you do not use CDC at the same time as a debug interface which also needs those pins, for example JTAG or SWD.

 

...

Pinouts for Interfaces | MPLAB Snap In-Circuit Debugger User's Guide

 

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

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

good day!

 

cat from avrdude.conf

snap_updi = MPLAB(R) SNAP in UPDI mode

question's...

 

UPDI - the debug mode (yes/no?)
SPI  - can't with snap? for command line programming

 

- linux x32/64, older & new... :o)
- avrdude 6.3-2021.01.17

 

if I'm wrong, correct this and do not criticize :o)

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

cat from avrdude.conf

snap_updi = MPLAB(R) SNAP in UPDI mode

UPDI - the debug mode (yes/no?)

 

Yes.  Well, UPDI is both upload AND debug, for the chips that support it.

 

SPI  - can't with snap? for command line programming

I would guess that "all" of the UPDI programmers are using the same JTAG2UPDI protocols as the JTAGICE3, so it's really easy to add such programmers to avrdude.conf, because you just alias some new USB ID to the JTAGICE3 protocols.
ISP may not be as easy :-(  (although there is a "type  = "jtagice3_isp";" used by the assorted XPlained Mini boards and such.  Maybe someone just hasn't done it.)

 

- linux x32/64, older & new... :o)
- avrdude 6.3-2021.01.17

None of the avrdude.conf files I can find mention SNAP at all, including Arduino (which has patches) and the CVS sources for avrdude itself.  Where did you get yours?

 

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

Maybe someone just hasn't done it.)

work is in full swing: o)

Where did you get yours?

facchinm/avrdude

 

+

 

i need to connect atmega328 ISP to SNAP through avrdude
apparently, it's impossible?

 

if I'm wrong, correct this and do not criticize :o)

Last Edited: Tue. Jan 19, 2021 - 04:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

sunjob wrote:

Maybe someone just hasn't done it.)

work is in full swing: o)

 

avrdude

 

i need to connect atmega328 ISP to SNAP through avrdude
apparently, it's impossible?

 

 

I've been using the SNAP and the PICkit4 as ISP programmers using this very fork of Avrdude. Works perfectly!

All you have to do is add the SNAP and PICkit4 to the avrdude.conf file, like I've done here: MiniCore avrdude.conf

Last Edited: Sun. Jan 17, 2021 - 10:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
programmer
   id    = "pickit4_isp";
   desc  = "MPLAB(R) PICkit 4 in ISP mode";
   type  = "jtagice3_isp";
   connection_type = usb;
   usbpid = 0x2177;
;

programmer
   id    = "snap_isp";
   desc  = "MPLAB(R) SNAP in ISP mode";
   type  = "jtagice3_isp";
   connection_type = usb;
   usbpid = 0x217F, 0x2180, 0x2181;
;

thank

if I'm wrong, correct this and do not criticize :o)

Last Edited: Sun. Jan 17, 2021 - 11:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edit : oops ... already in post #118

westfw wrote:
None of the avrdude.conf files I can find mention SNAP at all, including Arduino (which has patches) ...
https://github.com/facchinm/avrdude/blob/mainline/avrdude.conf.in#L1258

in GitHub - facchinm/avrdude: mainline avrdude imported from svn://svn.savannah.nongnu.org/avrdude/trunk

 

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

Last Edited: Tue. Jan 19, 2021 - 12:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

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

MPLAB Snap User's Guide

[page 41]

11.4 Revision D (September 2021)

• Removed references to headers throughout the document and added notices that the MPLAB Snap does not support debug headers.

 

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

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

Hi ,

 

 

 I bought MIcrochip PG164100 (MPLAB SNAP in-circuit debugger), I am unable to use it for a UPDI programmer for AVR controllers.

 I removed the R48 from the board and added a pull-up resistor with 4.7 Kohm. I am using Atmel studio Ide, my controller is atmega328P, when I tried in ICSP mode it gave an error as Change PIC mode to AVR mode, How do I convert it? Please help.

 

Regards.,

AMAR

amar.raghava@gmail.com

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

HI,

 

I bought MPLAB SNAP in-circuit debugger. I am new to this.

My requirement is to use this one as a UPDI programmer for avr ICs (like ATMEGA328p, 1608,4808, etc). 

 I Removed the R48 and also did the modification also( i.e gave a pull-up to J4 pin4 with 4.7K).

I got the error " change pic mode to avr mode before you start."

Please help me with how to change the mode.

 

Regards.,

AMAR

amar.raghava@gmail.com

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

Have you upgrade the FW? The FW on a new Snap must be upgraded to be able to use it in Studio. Currently the only way to do this is to try to use it in MPLAB X. For instructions see this: https://www.avrfreaks.net/commen...

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

i bought the mplab snap a couple of weeks ago. is it not updated?

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

jtxu wrote:
i bought the mplab snap a couple of weeks ago. is it not updated?
I don't think you can make that assumption about ANY electronic device you buy. The distributor/retailer you bought it from may be selling you the last one from the back of the store room that has been sitting there for 3 years or whatever!

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

I don't think that I have ever bought an Atmel programmer that did not require updating.   Especially if it was the first batch.

 

If an item is "update-able" the manufacturer seldom worries about the firmware installed at the factory.

They just assume that the User follows the instructions to upgrade firmware before use.

 

The Nano Every does not have an external pin for UPDI.   Only a tiny test-point.

I suggest that you experiment with other UPDI boards first.

 

But first off you need to do the hardware mod on the SNAP.

 

David.

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

clawson wrote:

The distributor/retailer you bought it from may be selling you the last one from the back of the store room that has been sitting there for 3 years or whatever!

I glad to bought from him with discounted.wink

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

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

OK.... so I "splurged" on a SNAP. It is not yet delivered but I wonder if anyone can assist with this query.

 

iirc when entering debug mode with debugWire, it is necessary to cycle the power to the target device. The xplainedMini has circuitry to do that.

 

I understand that SNAP senses the target Vcc but does not feed it.

 

Does this mean that the target needs a manual power cycle when entering debug mode with the SNAP?

 

Thanks in advance
Greg

regards
Greg

Last Edited: Sat. May 14, 2022 - 03:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes.   Just like JTAGICE-2, JTAGICE-3, Dragon, ATMEL-ICE, PicKit4, ...

 

That is why AS4.x AS5.x, AS6.x, AS7.0, Microchip Studio 7.0 prompt you.

And why you should do what they ask.

 

David.

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

So my SNAP arrived!!

 

I created a simply atTiny95 project under MPLAB. No device is connected.

 

The program compiles and attempts to load

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.

followed by

Refreshing debug tool status...
Refresh debug tool status could not be completed.

MPLAB prompts me to register the SNAP

Initialization failed: Failed while retrieving tool database (.snap) information
null
Failed to initialize Snap

Argh. This is not as easy as I had hoped.

 

I have followed the instruction as best as I can. My USB cable is less than a metre in length and works with an xplainedMin.

 

Any suggestions on obvious errors I am making?

Thanks

regards
Greg

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

gregd99 wrote:

I created a simply atTiny95 project under MPLAB. No device is connected.

 

Try typing accurately.

 

We all make typos.  But it does not inspire confidence when you ask a question.

 

David.

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

Absolutely correct. Apologies for that. 
 

Any suggestions regarding the problem are much appreciated. 

regards
Greg

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

Yes.  Just write down each step that you take.  Preferably with a number.

 

Then we can replicate each numbered step.  And see where the problem occurs.

 

The hardware mod is not necessary for ISP / debugWIRE.

i.e. you just need USB cable and six wires to your 3x2 ISP header.  (and power to the target)

 

David.

Last Edited: Wed. May 18, 2022 - 09:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A classic "fix" with fresh-from-fab Snaps is to try to debug a PIC first - this can help to shake the cobwebs out, and setup the dual-boot correctly for AVR mode to work correctly afterwards.  Worth a shot.

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

mraardvark wrote:
Worth a shot.
All you have to do is try and locate a PIC you can actually buy ! (and hope it doesn't have a 9month lead time on delivery) ;-)

Last Edited: Wed. May 18, 2022 - 09:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seriously.   Just write down each step.

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


clawson wrote:

mraardvark wrote:

Worth a shot.

All you have to do is try and locate a PIC you can actually buy ! (and hope it doesn't have a 9month lead time on delivery) ;-)

 

Ordered over the weekend and delivered yesterday. And I only paid normal prices.

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Last Edited: Wed. May 18, 2022 - 10:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

All you have to do is try and locate a PIC you can actually buy !

Well you don't actually have to _have_ a PIC, just pretend.  The Snap will be updated before MPLABX finds out you have no PIC at all :)

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

I presume that I just have to power-up my SNAP with J3 closed.  Then it will return to factory state.

 

So we just have to follow the OP's steps to replicate his problem.

 

It is not much good to just lay out the steps for the OP.

There is no guarantee that the OP would follow instructions.

 

If the OP writes his actual steps down we can see what he has done.

 

David.

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

david.prentice wrote:

There is no guarantee that the OP would follow instructions.

Very friendly this evening.

regards
Greg

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

I hope that the list of steps below is of assistance in understanding what I have done. I trued a different approach to what I did above....

 

  1. I have removed and reinstalled MPLAB
  2. I started IPE v6.0 and switched to advanced mode
  3. selected device dsPIC30F2020
  4. selected tool Snap xxxxx
  5. hit program
  6. there was no pic connected as i understood that was OK and the program would simply try and access the SNAP. The errors below appeared.
2022-05-18 21:12:22 +1000 - Programming...
*****************************************************
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.
*****************************************************
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.

I think these errors are to do with the device comms rather than the lack of a PIC attached.

 

Any suggestions are very much appreciated.

regards
Greg

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

gregd99 wrote:
Any suggestions are very much appreciated.

At this point I would reach for the "emergency recovery procedure" via the MPLABX IDE.

It will put your Snap into an even-cleaner-than-factory-fresh mode (SAM-BA bootloader) and build it back up from there.

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

Debug Menu | MPLAB® X IDE User’s Guide

[bottom]

Hardware Tool Emergency Boot Firmware Recovery

Run utility to restore hardware tool boot firmware to its factory state. See MPLAB ICD 4 or PICkit 4 Help for details.

How to Use the Hardware Tool Emergency Boot Firmware Recovery Utility | MPLAB® Snap In-Circuit Debugger User's Guide

 

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

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

mraardvark wrote:

gregd99 wrote:
Any suggestions are very much appreciated.

At this point I would reach for the "emergency recovery procedure" via the MPLABX IDE.

It will put your Snap into an even-cleaner-than-factory-fresh mode (SAM-BA bootloader) and build it back up from there.

Thanks gents.... there is progress

 

I went through the emergency procedure and the device was then detected on a comport and a bootloader downloaded.

 

Then back to IPE and followed my procedure above with the result below.

Not sure why it mentions AT90CAN128 as I had selected a pic...

2022-05-18 22:13:18 +1000 - Programming...
*****************************************************

Now Downloading new Firmware for target device: AT90CAN128
Updating firmware application...
Connecting to MPLAB Snap

Currently loaded versions:
Application version...........1.10.249 (0x01.0x0a.0xf9)
Boot version..................1.0.0 (0x01.0x00.0x00)
Tool pack version ............1.11.759
Low target voltage detected (43 mV)

The configuration is set for the target board to supply its own power but no voltage has been detected on VDD. Please ensure you have your target powered up and try again.
Connection Failed.
Low target voltage detected (43 mV)
The configuration is set for the target board to supply its own power but no voltage has been detected on VDD. Please ensure you have your target powered up and try again.

*****************************************************

Connecting to MPLAB Snap

Currently loaded versions:
Application version...........1.10.249 (0x01.0x0a.0xf9)
Boot version..................1.0.0 (0x01.0x00.0x00)
Tool pack version ............1.11.759
Low target voltage detected (35 mV)

The configuration is set for the target board to supply its own power but no voltage has been detected on VDD. Please ensure you have your target powered up and try again.
Connection Failed.
Low target voltage detected (37 mV)
The configuration is set for the target board to supply its own power but no voltage has been detected on VDD. Please ensure you have your target powered up and try again.

There was no target connected which (I hope) accounts for the errors now.

 

next step... connect a target.

regards
Greg

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

I followed the Hardware Reset procedure.   This downloaded default firmware via a SAMBA bootloader.

 

I ran your steps in #144.

Selected dsPIC30F2020

Selected SNAP

 

Of course I could not connect or program a nom-existent dsPIC30F2020

So I selected ATmega328P

Selected SNAP

Connected SNAP to Uno 3x2 (powered)

 

Then clicked [READ]

Which gave this report:

 

*****************************************************

 

Now Downloading new Firmware for target device: ATmega328P
Updating firmware application...
Connecting to MPLAB Snap

Currently loaded versions:
Application version...........1.10.249 (0x01.0x0a.0xf9)
Boot version..................1.0.0 (0x01.0x00.0x00)
Tool pack version ............1.10.701
Target voltage detected

 

*****************************************************

 

 

The following memory area(s) will be read:
program memory: start address = 0x0, end address = 0x3fff
configuration memory
Data Flash memory
Read complete
2022-05-18 13:49:03 +0100 - Memory Updated: CRC32 checksum value is based on the loaded hex file.

 

I then connected a PIC45K50.

 

*****************************************************

 

Connecting to MPLAB Snap

Currently loaded versions:
Application version...........00.04.65
Boot version..................01.00.00
Script version................00.04.91
Script build number...........25982bebb1
Tool pack version ............1.10.701

MPLAB has detected that the low voltage configuration bit on the device is off. Because Snap can use only low voltage programming, this configuration bit must be turned on in order to use Snap. You will need to use a different, blank device, or use another debug tool to erase this device, before continuing with Snap.
Connection Failed.

 

Then I tried a PIC18F458.   Which was rejected completely.

 

So I set back to ATmega328P and this behaved exactly as earlier.

 

David.

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

This was the first time that I have tried MPLABX IPE v6.00

It seems fairly straightforward.

 

I had previously only used IDE v6.00

which behaves in a similar way.  Just has extra-long drop-downs.

 

I strongly recommend that you connect a real-life AVR chip.    (it will give you confidence)

It is not strictly necessary.   AS7.0 should work with SNAP now that you have updated the SNAP firmware.

 

David.

 

Edit.  My apologies for being grumpy earlier.   If you say which AVR you are using I can probably repeat the "Factory Reset SNAP,  connect to your specific AVR" steps.  e.g. with ATtiny85

Last Edited: Wed. May 18, 2022 - 01:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I have now connected an atTiny85 to IDE/IPE and programmed OK.

 

I swapped to Studio and found that it did not know about the t85 for SNAP. i.e. when I selected SNAP as the debugging tool in project properties, t85 was not listed.

 

I downloaded the atTinyDfp pack in Tools->Device package manager and now t85 was listed.

 

I have now

- programmed a device,

- flashed a led,

- modified RAM using the debugger to change the LED flash rate

- stopped at a breakpoint

 

This is a good time to stop for the evening.

 

Thanks to all for your assistance to get this far.

 

If someone from Microchip is reading....

 

Despite having read the posts beforehand.... this was a pretty challenging start to use a new tool.

Having to plug into MPLAB was a bit klunky... but I understand the history.

The process from there was not fun.

It would be really great if Microchip could publish the definitive "getting started guide"

[if my experience is typical.... it might be a bit embarrassing to write the guide'

regards
Greg

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

I agree.  Life will be so much easier if and when SNAP can be updated via AS7.0

 

Incidentally,  the PicKit4 could connect to a PIC18F458 in MPLABX IPE.

And then go straight to an ATmega328P in AS7.0   i.e. change from PIC mode to AVR mode

 

Mind you.  I doubt if I will ever want to use either of the two PIC18F chips that I possess.

Pages