MPLAB IDE and PICKIT 4 vs SNAP?

I hope this is the right forum section to ask this.

(And I fully realise that I may be inviting a few flames here. So I now have my flame-retardant protective gear on. ; )

I know that this forum is mainly for users of the very excellent Arduino IDE and Arduino (or Arduino-compatible) boards, etc. The Arduino suite of tools is absolutely the best, for quick prototype development, as well as quick entry and ramp-up for folks that are new to microcontroller-based development. I do not believe that the Arduino system can be beat in this regard,

But I am now interested in moving onto development and debugging tools that can utilise the on-chip debugging features of some AVR (as well as PIC) microcontrollers. (And, yes, I do want to explore using some of Microchip's XLP PIC devices, such as the PIC12LF1840, for battery-powered projects.) It would be great to be able to have the ability to use breakpoints, look directly into internal registers, measure code performance, etc., without having to program it into the project software or using the serial port PRINT statements, etc. (Although, I suppose there are probably some software requirements for supporting on-chip debugging interfaces like JTAG, DebugWire, etc.)

So, in addition to continuing to use Arduino for quick prototype development and programming of AVR-based projects, I would also like to explore Microchip's MPLAB X IDE and hardware programming/debugging tools.

It is interesting to note that, since Microchip took over manufacture and sale of AVR devices (from Atmel), they have been adding support of AVR devices into their MPLAB tool suite. So most (if not all) of their MPLAB tools now support BOTH PIC and AVR devices.

In particular I would like to know the differences between the "PICKIT 4" programmer/debugger (which they advertise as compatible with AVR devices, as well as PIC devices), and the "MPLAB SNAP" (which also supports both families). The "PICKIT 4" is significantly more expensive than the SNAP. So I am wondering what features and capabilities I would be losing by choosing the SNAP instead the PICKIT 4?

Does anyone here have experience with these "other" tools, or have you any suggestion on their use?

(And, now, let the flames begin! ; )

Woops. Okay. Never mind. I just found a comparison chart on the Microchip web site. (Embarrassed emoticon goes here. ; )

But I would still like to hear about any experience you may have had with these tools.

Thanks and best regards,
DuinoSoar.

The Microchip forum would be a much better place to post questions like that.

The Pickit4 will do certain HV serial programming, supposedly.
The snap needs an external pull down resistor for certain new (Updi) avrs.

Thanks for your reply.

I do know about the HV capability of PICKit 4 (vs. the Snap not having HV programming), but I was not too concerned about that, as I intend to keep the reset pin option where it can be used for LV programming (either ISP or UPDI, depending on the chip). BTW, I only just discovered about the newer (to me) AVR 0-Series and 1-Series chips, just the other day, AFTER my original post above (even though they have been available for some time). And Spence Konde (a.k.a @DrAzzy) has even written an Arduino board definition for them, as well as a sketch to run an Arduino as a UPDI programmer (but the sketch, called jtag2upd, does not providei on-chip debugging capability, AFAIK).

Perhaps you (or someone else here) could answer a question about PICKit 4. In Microchip's comparison chart of PICKit4 vs Snap, there is an intriguing comparison point: "Current Sensing" (PK 4 has it, Snap does not). Does that mean that the PK4 can measure and report (to the MPLAB X software) the amount of supply current (Ipp) being drawn by the device? And, if so, can it measure and report small current levels (down to the tens or hundreds of nano-Amps during sleep modes)? That would be awesome if it can do that.

I am thinking of a battery-powered project where I would like the batteries (2 AA alkaline batteries to power the micro at nominally 3 V) to last for about a year (if possible); the processor would be in a sleep state for a large majority of the time). So the amount of current draw during sleep is of prime importance, and it would be good to be able to measure that during testing/debugging. So I am thinking of ordering some PIC12LF1840's AND ATtiny412's (BOTH), and develop my project for both parts, and see which has the least demand on battery power. The application cannot put the processor into a "deep sleep" where absolutely everything is shut down, because it needs to run a timer (either one of the processor timer/counter peripherals, or the Watchdog timer) for wake-up from sleep.

Thanks,
DuinoSoar.

I have both and have been developing for PICs for a while, mostly the PIC16F153xx and PIC32MM series. The development experience with MPLAB X has gotten a lot better over the past few years, and is now a rather pleasant experience. I really enjoy using their code generation framework (Microchip Code Configurator). It took some getting used to, but now starting up a new project is a breeze. Both the Snap and PicKit 4 is somewhat slow though, which is to be expected from such a low cost tool. Stepping through code can be mildly frustrating at times, but i don't think it's a deal breaker. But more expensive tools such as the atmel-ice runs circles around them (I don't have an MPLAB ICD, so I can't compare to that one).

The PicKit 4 can NOT do power analysis. The current sensing is a protection feature only.

Besides the high voltage programming (which I personally rarely use), there's really not that big of a difference for the casual maker. The differences mostly matter if you do production programming (protection circuits and powering the target).

Note though that since I own an atmel-ice I've had no reason to program/debug AVR with them.

Well, except that the Atmel ICE (as I understand) cannot do UPDI programming/debugging, for the newer series of AVR chips.

So it sounds like the lower-cost Snap is the way for me to go (as a "casual maker" :grinning_face_with_smiling_eyes:) due to its lower cost. Also, I want to try both the PIC and AVR families, to compare performance, power consumption, etc.

If it were for programming only, I would just use the Arduino-as-ISP or jatag2updi sketches. (I think there are even some Arduino sketches that will program PIC devices.) But since I want to be able to do code analysis (breakpoints, stepping, register examinations, etc.), I think I would really like to try the Snap with MPLAB X.

Edit: Oh one more thing. Can MPLAB X / Snap do source code debugging in C? I.e. will it show code breaks, etc. at the C source line, level?

Thank you for your response.

Yes. Better than assembly, in some cases (IIRC, there are still some bugs in the AVR disassembler, causing it to incorrectly show multi-word instructions.)

It can. Some of my recent projects is using the AVR DB series, and it works perfectly. But to clarify, I'm not trying to convince you to buy an atmel ice. I was only using it for a comparison. It's a great tool but is like 3x more expensive than the pickit 4 and does AVR/SAM only.

Not to discourage you, but I think your conclusion is going to be: it depends! xD

I personally like PIC more than AVR. With the exception that is the new AVR series. Combining PIC like peripherals with the AVR core is just beautiful, and at a very reasonable price point as well!

Yes it can.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.