MPLAB Snap
http://www.microchip.com/developmenttools/ProductDetails/PartNO/PG164100
...
The MPLAB® Snap In-Circuit Debugger/Programmer allows affordable, fast and easy debugging and programming of most PIC®, dsPIC® and AVR flash MCUs, using the powerful graphical user interface of MPLAB X Integrated Development Environment (IDE) version 5.05 or later.
...
MPLAB Snap
A subset of MPLAB PICkit 4 but with a limitation on UPDI and PDI (not 5V? not 12V?)
MPLAB Snap In-Circuit Debugger Information Sheet
(pages 4 and 5 for 'Interfaces Comparison' MPLAB Snap to MPLAB PICkit 4
Edit: pages
$14.95 while supplies last!
I understand that 'low voltage' means just not 12V. I hope. 5V supported.
They say avr spi support. With only two pins (and reset) ...
They say avr spi support. With only two pins (and reset) ...
they also say "same pinout as PICKit-4, which has more detailed info and shows connections to pins that the main diagram claims are "unused."
... MPLAB X Integrated Development Environment (IDE) version 5.05 or later.
MPLAB Snap device support is a subset of MPLAB PICkit 4.
Most popular AVR minus mega328, minus XMEGA, and minus unified memory AVR (tinyAVR 0 and 1-series, megaAVR 0-series)
http://www.microchip.com/mplab/mplab-x-ide (Downloads tab, Release Notes for v5.05, Device Support.htm)
MPLAB PICkit 4 pinout expanded in
Microchip Developer Help
MPLAB® PICkit™ 4 In-Circuit Debugger (ICD)
Pinouts for Interfaces
http://microchipdeveloper.com/pickit4:interface-pinouts
...
due to https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=3#comment-2527161
with PCB feet
YouTube
Unboxing the New MPLAB® Snap Debugger
Aug 20, 2018
That's the usual price, 15 USD, that was new there as of 21-Aug'18.
The October sale is a 25% discount at
microchipDIRECT
DEVELOPMENT TOOL DEALS
I got one, using the 25% discount. It's a little thing, I thought it would be more like the dragon. It fits a regular micro USB cable. I'll have to make a scrambler cable to connect to a 6 pin avr connector.
I'm used to flashing my processors. I guess now I snap them.
I'm used to flashing my processors. I guess now I snap them.
Just don't crackle or pop and you're good to go
Torby wrote:
I'm used to flashing my processors. I guess now I snap them.
Just don't crackle or pop and you're good to go
Well, I already fry them.
Hi
Am I allowed to ask some stupid questions?
I have obtained a SNAP and hope to be able to use this for ATmega328x and ATtiny debugging. From gchapman's post
(thank you g) it would seem that the AVR ISP and dW interfaces can be used for these devices.
Now my stupid questions (I ask your forgiveness in advance)
1) Can both the AVR ISP and dW be used for both programming and debug, or must one be used for programming and the other for debug?
2) What is VTG? Is this a potential (positive) supply to the target device? Or is this a supply back from the target for logic-level shifting? Or something else?
3) This image below from westfw's post - thank you too - indicates that pins 6, 7 and 8 either should not be connected or are unused. Should I even ask?
At this point in my learning, I know nothing at all about traditional Microchip parts or technologies and not a great deal about Atmel AVR.
On the positive front, I have got MPLAB X IDE installed on a PC and this seems to recognise the SNAP. My next steps will be to create an 'Hello World' program for an ATtiny85, try to upload that to the target and then try to work out how to debug.
After that I might look into this world peace thing...
Thank you all for the work you have done in creating and maintaining this wonderful forum.
M
VTG is the "target voltage" i.e. VCC from your externally powered AVR chip.
I suggest that you start with Uno hardware. Cut the RESET-EN solder-bridge. This lets you use debugWIRE.
Life is much simpler when you have a regular 3x2 ISP/dW header and a permanent UART-USB Serial link.
MPLABX + SNAP should work ok with the ATmega328P
It probably works fine with ATtiny85. But it is painful to hook up hardware (if you expect readers to guide you through any project)
David.
1) Can both the AVR ISP and dW be used for both programming and debug, or must one be used for programming and the other for debug?
2) What is VTG? Is this a potential (positive) supply to the target device? Or is this a supply back from the target for logic-level shifting? Or something else?
I have obtained a SNAP and hope to be able to use this for ATmega328x and ATtiny debugging.
3) This image below from westfw's post - thank you too - indicates that pins 6, 7 and 8 either should not be connected or are unused. Should I even ask?
My next steps will be to create an 'Hello World' program for an ATtiny85, try to upload that to the target and then try to work out how to debug.
https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=5#comment-2643626
2) What is VTG? Is this a potential (positive) supply to the target device? Or is this a supply back from the target for logic-level shifting? Or something else?
It's the highlighted option. You can see the level shifters on the snap, close to the data lines, they need to get power from the target device.
When will they provide an updated AtmelStudio that uses MPLAB SNAP as debugger/programmer? :(
I wouldn't hold your breath - it seems pretty clear that the intention is to try and slowly migrate everyone from AS7 to MPLAB
PicKit4 works pretty well in AS7.
I bet that SNAP would appear as a cut-price PicKit4. They would simply disable some devices / features.
It would be wise for Microchip to concentrate on one piece of software.
MPLABX is ok for building projects. In fact it is nicer than AS7 in several ways.
The "MPLABX debug" is not as good as AS7. (yet)
David.
Thank you David.
Another mystery vanishes.
M
Thanks clawson.
That's very helpful. dW is what I will concentrate on for now.
I didn't know that AVR programmers do not provide a power source to the target device. That information will, no doubt, save me a lot of pain downstream.
2) What is VTG? Is this a potential (positive) supply to the target device? Or is this a supply back from the target for logic-level shifting? Or something else?
It's the highlighted option. You can see the level shifters on the snap, close to the data lines, they need to get power from the target device.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Ah, cool!
Thank you El Tangas
Describe what hardware you have got on your desk.
Uno clone + SNAP + PC is all that you need to get started.
In fact an XMINI-mega328 + PC would be even easier.
Yes you can mess around with breadboards, UART-USB dongles, power supplies, ...
They are all things that can go wrong.
If you stick to common items readers might even walk you through a project (that they can set up on their own desk).
One of the beauties of Arduino is that anyone, anywhere in the world can upload a sketch and run it on their own Arduino.
You can also use the same Uno hardware to run a non-Arduino program. And readers can replicate this too. e.g. from your AS7 project.
David.
bWildered1 wrote:There will be issues; try beginning at https://www.avrfreaks.net/forum/mplab-snap-atmega328pb-program-and-debugwire?page=1#comment-2644391 and subsequent for a few workarounds though there's more information in that thread.I have obtained a SNAP and hope to be able to use this for ATmega328x and ATtiny debugging.bWildered1 wrote:expansion as MPLAB Snap is from MPLAB PICkit 4 which is the follow-on to MPLAB PICkit 3 (PIC only)3) This image below from westfw's post - thank you too - indicates that pins 6, 7 and 8 either should not be connected or are unused. Should I even ask?bWildered1 wrote:tiny85 is beta in MPLAB X v5.15; you may be the first here to try MPLAB Snap with tiny85.My next steps will be to create an 'Hello World' program for an ATtiny85, try to upload that to the target and then try to work out how to debug.https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=5#comment-2643626
Thanks for the evening's reading, gchapman.
It was interesting.
I hooked up a Digistump Digispark Tiny85 this morning and gave it a spin on MPLAB X with the SNAP. I used a 3V3 supply to the Tiny, and a connection from this to the SNAP VTG (along with GND). The only other connection I made was from SNAP pin 6 - dW - to P5 (RESET) on the Digispark Tiny. Then started a debug session. The end result was this message...
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.
Naturally I tried all USB ports and several cables.
(This is a Win7 installation; I also have a Linux system which I might try out, just to see...)
I seem to remember coming across something similar in my late night reading, so I'll go back over that to see what might turn up.
Thank you all for your help and advice.
Will let you know what happens, when I have further news.
M
Seriously. Buy a Uno clone. Cut the RESET-EN solder-bridge. Connect all 6-pins of the ISP interface.
The Unos are very cheap. Check that your clone has a RESET-EN printed on the pcb.
You have a useful amount of memory, peripherals, ...
Existing shields plug and go.
Yes, it is "fun" to squeeze something into an 8-pin chip. Even more "fun" with a 6-pin chip.
It is not a useful way to start learning about the subject.
More of an advanced project for an experienced user.
David.
Data transmission failed. Error code -10121 returned while trying to receive USB data....
Naturally I tried all USB ports and several cables.
,,,
I seem to remember coming across something similar in my late night reading, so I'll go back over that to see what might turn up.
https://www.avrfreaks.net/forum/mplab-snap-atmega328pb-program-and-debugwire?page=1#comment-2655506
The USB issues from MPLAB X v5.15 'Readme for MPLAB Snap.htm' :
...
Use a full-featured Micro-B USB cable (data and power), no longer than 1.5 meter, to connect to a computer (for example, the Microchip Part Number ATUSBMICROCABLE-XPRO).
...
9.3 Other Tool SSRs (System Service Requests)
...
PK4-31
The firmware update will fail with either the MPLAB PICkit 4 or the MPLAB Snap ICD tool, when using:
- USB Full-speed port
- USB Full-speed hub
- USB Full-speed isolatorWorkaround:
The tool would have to be plugged into a USB Full-speed or USB SuperSpeed USB port/hub/isolator to allow the firmware update process to complete successfully.
After the firmware update completes, the tool can then be plugged back into a USB Full-speed port/hub/isolator.
...
https://new.microchipdirect.com/product/Other?keywords=ATUSBMICROCABLE-XPRO
MPLAB X IDE | Microchip Technology
Describe what hardware you have got on your desk.
Uno clone + SNAP + PC is all that you need to get started.
In fact an XMINI-mega328 + PC would be even easier.
Yes you can mess around with breadboards, UART-USB dongles, power supplies, ...
They are all things that can go wrong.
If you stick to common items readers might even walk you through a project (that they can set up on their own desk).
One of the beauties of Arduino is that anyone, anywhere in the world can upload a sketch and run it on their own Arduino.
You can also use the same Uno hardware to run a non-Arduino program. And readers can replicate this too. e.g. from your AS7 project.
David.
Hi David.
If that post is for me, well let's see...
Test Equipment
DMM, 'scope, Logic Analyser, Component Tester (AVR based), probably some other stuff that I don't use very often
Power Supplies
Various
MCU Dev Stuff
Various STM8S and STM8L based (STM8S103 and STM8L151 probably most common), along with STLINKV2 programmer and debugger
ATmega328P, ATtiny85 devices with an USBASP (and now a SNAP)
STM32F various (along with the previously mentioned STLINKV2)
Some development/experimental boards
Various STM32 Discoveries/Nucleos, a TI Tiva, an Atmel Xplained (think I have two of these somewhere, one with an ATmega328PB and the other an ATtiny817), an MSP430something_or_other (I haven't used MSP430 for some time), and a few Arduino UNOs.
Dev Envs
Atmel Studio 7 (recently acquired, and was trying to get to grips with it when I became aware of the SNAP which led to), MPLAB X, Code Composer Studio (for MSP430), ST Visual Develop (for STM8), Code::Blocks (STM8 and general purpose), Atollic True Studio (STM32), Keil, IAR (used to use for MSP430, way back when), and (various)-gcc, cosmic, sdcc and ARM compilers. I prefer using SDCC with Code::Blocks on Ubuntu for STM8, and would use Ubuntu (or any Linux system) for AVR development if I could (MPLAB X offers that possibility).
Just a general comment, but over the years I have come to dislike Java and .NET based applications intensely. They might produce nice shiny products, but boy are they slow. Yea, I know that includes Atmel Studio, MPLAB X and Eclipse based tools.
I don't have any (current) plans for the MSP430. I do have some projects in mind that I think will suit the STM8x, and I have a couple for the Tiny, and some half-ideas (as yet) for the STM32.
PCs
Win7 64 Bit (pressed back into service and only really used for Atmel Studio)
Ubuntu 16.04 64-Bit (a 14 year old, but still my general use, system)
I've probably left out some stuff.
I suppose I should try to explain where I am coming from and where I want to go.
I used to do electronics (even got one of those engineering thingys a long time ago), and worked in various computer related fields over the years. Then I had what was described to me as a 'Neurological Incident'. Well, a couple of those.
And I have had to relearn a lot of things. (Including reading, which I find very tiring, although oddly I can write...)
Anyway, I have long realised that 'I' learn best when I do, rather than when I read. And so I am going to 'do'.
I am going to 'automate' my home. (That's not the correct term, but it'll do for now.)
I have long wanted to create a Renewable Energy monitoring system, maybe even more than that. Something that would log and report generation and consumption, for instance. And I want to monitor things like room temperatures and ambient temperatures. I would like, maybe, to set up a home brewing system, or home wine making (is there a term for that?) system, and have something monitor, or maybe control, such a system. I will build a greenhouse, and monitor that. And so on.
Then I recently discovered the new fangled idea called Internet-of-Things or IoT (a silly name, but it wasn't me I promise). Now one of the 'problems' I had not found a comfortable solution to was how to transfer data from possibly distributed control and monitoring systems to some central server or hub. I wont go into all of the things I considered, 'coz I when I tripped across this IoT I started getting ideas.
So I invested in a Raspberry PI (RPi) Zero. And I have got that set up and hooked into my home network. And I set up MQTT (just to see if I could).
Now I have discovered there's a problem with the RPi - it really does not like power outages, or other disturbances to its power source. It does not like that at all.
And so the first project for the new me will be an Uninterruptable Power Supply (UPS) for the Pi. The simplest of these would require 2 microcontroller pins, an ADC and a timer. Other functionality could be added, but all would 'fit' into an ATiny85 (I think it would fit an ATtiny13, but time will tell).
Now one of my 'controls' (I can't think of the right word) is to be parsimonious with resources, particularly power. And to make these control and monitoring systems as small and 'mean' (is that the right word?) as I can.
I have created a (provisional) board layout with a Digispark Tiny85 which is 1.5" x 0.8". That will fit snugly onto the Pi and an adjoining LiIon battery system.
The Arduino is fine. For what it is. But small and power conscious it is not. It would dwarf my Pi-Battery 'some word I cannot find'.
And this also gives me the opportunity to 'learn AVR debugging'.
If you get what I mean.
Anyway, sorry for all that rambling.
And thank you David, and all the rest of you, for information you have provided. A lot of my uncertainties are now behind me. I can now move on to new uncertainties.
(...now to get that SNAP debugging for me...)
Just a general comment, but over the years I have come to dislike Java and .NET based applications intensely. They might produce nice shiny products, but boy are they slow. Yea, I know that includes Atmel Studio, MPLAB X and Eclipse based tools.
Is it .NET or the operation of .NET?
Advantages of C# (.NET) and Java are those are memory-safe computer languages and the abstractions; disadvantage is the requirement for computer resources (CPU, memory)
The Visual Studio Code Arduino extension has EDBG; AVR GDB is a recent addition to Visual Studio Code.
Microsoft Visual Studio Code's hardware requirements are significantly less than that of Microchip MPLAB X.
Anyway, I have long realised that 'I' learn best when I do, rather than when I read.
to set up a home brewing system,
And so the first project for the new me will be an Uninterruptable Power Supply (UPS) for the Pi. The simplest of these would require 2 microcontroller pins, an ADC and a timer.
There are PMIC with one or two power inputs, a Li-ion cell charger, buck or buck-boost SMPS, and an ideal diode or two.
There's likely a Pi Hat that will meet your requirements.
PMIC are common for arm Cortex-A and ARM9.
Some PMIC are designed to mate with specific arm application CPU or are already on a SoM.
https://www.avrfreaks.net/forum/avr-studio-mac-linux#comment-2600281
https://code.visualstudio.com/docs/supporting/requirements#_hardware
ATSAMA5D27-SOM1 - Microprocessors
Hi All
I apologise in advance for what is to come.
Preamble
I obtained a SNAP programmer/debugger intending to use with AVR ATmega and ATtiny devices, most notably ATmega328Px and ATtiny85. I installed MPLAB X (5.15) IDE and IPE on a Win7 64-bit machine, but both applications reported problems when attempting to communicate with the target, a Digispark ATtiny85, specifically
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 tried many things, many suggestions in many posts to no avail until a link to another thread provided by gchapman led me to this
-------------------------------------------------------------------------------------------------------------------------------------------
Ok, I powered up my Snap #2, and out-of-the-box, "Error code -10121". Snap #1 is still working.
I reproduced the way snap #1 started working:
1) select ATSAMC20E1A
2) press Apply
3) press Connect. Some firmware activity takes place. Some Win drivers are installed.
4) select ATtiny1616
5) press Apply
6) press Connect. Some firmware activity takes place. Some Win drivers are installed. This message should appear:
*****************************************************
...
Currently loaded versions:
Boot version...................1.0.0Now Downloading new Firmware for target device: ATtiny1616
Updating firmware application...
From here on, the Snap is "cured". Worked on my 2 Snaps.
edit: forgot to say - this is using the IPE software.
-------------------------------------------------------------------------------------------------------------------------
by El Tangas in https://www.avrfreaks.net/forum/...
I tried those steps with the following results.
(Note: before I started there was a 'Microchip' category in Device Manager)
1. I started MPLAB IPE (hereafter IPE) and selected the ATSAMC20E15A (there doesn't seem to be an 'E1A)
2. I pressed 'Apply'
3. I pressed 'Connect' -> Windows began installing, and successfully installed, a new device which is labelled 'Microchip WinUSB Device'
The IPE failed to connect, reporting the following
*****************************************************
Connecting to MPLAB Snap...
Currently loaded versions:
Application version............00.00.17
Boot version...................01.00.00
Script version.................00.02.77
Script build number............5215401e64
Connecting to MPLAB Snap...
Currently loaded versions:
Boot version...................01.00.00
Updating firmware application...
Connecting to MPLAB Snap...
Currently loaded versions:
Application version............00.02.11
Boot version...................01.00.00
Script version.................00.02.77
Script build number............5215401e64
You have set the program speed to Normal. The circuit on your board may require you to slow the speed down. Please change the setting in the tool properties to low and try the operation again.
Failed to get Device ID. Please make sure the target device is attached and try the operation again.
Connection Failed.
-----------------------------------------------------------------------------------------------------------------------
Continuing with El Tangas' steps
4. Select ATtiny85 ('cause that's what I got...)
5. Press 'Apply'
6. press 'Connect' -> Windows began installing, and successfully installed, some more device driver(s)
The Device manager now shows a new category has been created (I didn't notice this at the time) - Human Interface Devices - and a new COM Port has been assigned - 'Snap Virtual COM Port'
A later examination of 'Human Interface Devices' shows
In the meantime, an activity icon adjacent to the IPE 'Connect' button began spinning its wheels, the fans on the PC sprang into life and became laboured after a time. This remained the state for some time. I left it for one half hour, just to ensure that it was really 'stuck' in some sort of loop.
Here's a couple of Windows Task Manager screenshots
At this point I had three options
(i) Unplug and re-connect the SNAP USB cable
(ii) Shutdown and restart IPE
(iii) Shutdown and restart the PC
I tried (i) -> There was no difference. The IPE kept spinning its wheels apparently trying to connect, and the PC CPU usage remained high
Then I tried (ii) -> the CPU usage immediately dropped to zero, or thereabouts
I restarted the IPE.
Pressed 'Connect' -> et voila! SUCCESS!
I then tried to read the configuration bytes on the Digispark ATtiny85, which are non-standard (if I may phrase it like that)
This shows the configuration bytes to be
L: 0x62
H: 0xDF
E: 0xFF
Lock: 0xFF
These are NOT correct.
I had previously checked the configuration bytes using AVR Studio and obtained the following
L: 0xE1
H: 0xDD
E: 0xFE
Well, at least IPE is now trying...
I then shut down IPE and started MPLAB X IDE (hereafter IDE) and tried to read the configuration bytes
Woo Hoo!
And the configuration bytes are correct too!
Then I tried to start a debug session...
OK. Not there yet!
But progress all the same.
It would seem that the MPLAB X install does not install the SNAP drivers correctly. On Windows, at any rate.
My car is due its annual medical, so I'm going to be tied up the next few days and, with other things to do as well, I probably wont be able to get back to this until mid-next week.
I would like to thank you all for your time and the very valuable help you give to those like me.
Where would we be without you?
Take care all
M
ps
One further apology...
When I was trying to work out how to add a picture to a post I added an attachment. Now I cannot work out how to remove that. And I am now too tired to care any more.
So, sorry again.
M
Attachment(s):
The digispark contains USB software and bootloader.
If you attempt to use AS7 the USB/boot code will be erased.
Life is simpler if you use a ATmega328P. You kill the bootloader but you still have the UART-USB comms.
Thanks for your earlier information. You clearly have experience. But I still reckon it is unwise (tm) to start with the Digistump.
David.
The digispark contains USB software and bootloader.
If you attempt to use AS7 the USB/boot code will be erased.
Life is simpler if you use a ATmega328P. You kill the bootloader but you still have the UART-USB comms.
Thanks for your earlier information. You clearly have experience. But I still reckon it is unwise (tm) to start with the Digistump.
David.
Sorry David, but I don't understand.
I must be in a dense state of mind at the moment.
M
In #31 you explain that you have XMINI boards and also ATmega328, ATtiny85 with USBASP.
I conclude that you are not an impecunious 12 year old. You have bought XMINI. You could buy a Uno clone.
You are aware that an external programmer will erase all the AVR memory. Boot section too.
A tiny85 has no Boot section or section specific protection.
I suggest that you gain experience with the XMINI(s) first. One USB cable and away you go!
Yes, we would be happy to walk you through SNAP + bare mega328P. Or even SNAP + bare tiny85.
The Digispark board becomes a bare tiny85 as soon as you erase the chip.
You will need to ask Digistump about debugging a Digispark board without destroying the Digistump USB.
David.
Hi All.
(Continuing from post #33)
Got an hour, so I continued from where I left off last night.
I had got to the stage where MPLAB IPE and IDE were communicating with the SNAP and could (apparently) communicate with the target. The latter seemed to be the case because both IPE and IDE reported successful reads of the target's configuration bytes, although the byte values reported by IPE were incorrect.
In IDE I had then tried to start a dW debug session, and got this...
I continued today by clicking the 'Yes' option in the window above to enable debugWire.
I was asked to toggle the power to the target...
...which I did.
I then tried to start a debug session. MPLAB IDE went through the motions, seemed to compile and upload the code, the PC started to go bananas again (high CPU usage, fans threatened to go on strike...) and remained like this for quite a while. Until I 'Paused' the debug using the icon on the toolbar.
I wont add screenshots of that here, or of MPLAB at that stage.
I have no idea yet how to use MPLAB and the views are strange to me; I am more used to IDEs that automatically open debug windows displaying the code with a cursor halted in an appropriate place, with a window showing registers, and so on.
Anyway, I found an IO View in one of the menus and that opened this
Among the other things on view, the window on the bottom right is showing the registers for Port B.
I toggled the value in PORTB - the Port B output data register - and an LED on the Digispark Tiny85 module switched on and off (having previously made sure that the Data Direction Register for Port B - DDRB - had configured that pin as an output, of course).
So cool!
All would seem to be Right With The World again.
The rest is down to me.
I will have to work with MPLAB to learn how to use it properly.
I can now deem this matter to be been resolved successfully, and get on with those little plans of mine.
Thank you all - I could not have done this without you.
Take care
M
ps
Summary
There remains a bug in IPE - it does not read the target configuration bytes correctly (perhaps it is displaying the device defaults?)
MPLAB install does not install the - Windows at least - SNAP drivers correctly; I used the procedure discovered by El Tangas to kickstart the SNAP driver install, and that seems to have got the beast working
In #31 you explain that you have XMINI boards and also ATmega328, ATtiny85 with USBASP.
I conclude that you are not an impecunious 12 year old. You have bought XMINI. You could buy a Uno clone.
You are aware that an external programmer will erase all the AVR memory. Boot section too.
A tiny85 has no Boot section or section specific protection.
I suggest that you gain experience with the XMINI(s) first. One USB cable and away you go!
Yes, we would be happy to walk you through SNAP + bare mega328P. Or even SNAP + bare tiny85.
The Digispark board becomes a bare tiny85 as soon as you erase the chip.
You will need to ask Digistump about debugging a Digispark board without destroying the Digistump USB.
David.
Ah!
I see!
I think.
The USB comms on the Digispark is of no interest to me.
I use the STM8Sxxx and the STM32Fxxx because of these
And this
And more like those.
Those little boards ease prototyping and experimenting enormously. They can be 'socketted' (or is it 'headed'), it is easy to connect a programmer/debugger, or any other hardware for quick tests/checks.
And that STLINKV2 not only programs but debugs as well.
All for a couple of Galactic Credits.
Other MCUs aren't really available like this.
There are a couple of AVRs on little boards that would make my life easy
With the USBASP for programming
But with no debug capability.
And I think it is rediculous to spend 50 times the cost of the microcontroller on a debugger.
Then along came SNAP.
Which is still far to expensive in my opinion.
But I was given one as a gift.
And so...
And so, I am now looking at using some of those ready made little development boards in projects.
It would be a trivial matter (I know, famous last words) to use an STM8S001J3/8L001J3/8L050J3 for those projects I have in mind that only need a few pins, or limited other resources. But it would be nice to see what I can do with a Tiny...
I have a few ATmega328P on little dev boards. I have one Digispark Tiny85. I think the project I have in mind at the moment would probably fit onto a 'tiny13 so, if it does, I'll get some of those and use one for the 'real' end unit. (I don't suppose you know if MPLAB reports RAM 'usage', if you know what I mean? Actually, that's a question for a different Post/Thread, or this one will spaghettify.)
I have several Arduino UNOs. They're OK. For what they are. But they are not the *most* suitable for pretty much any of the many projects I have in mind right now.
And besides, I want to work out how to use AVR properly. How to debug an AVR using the SNAP. And so on.
There's no point having a SNAP just collecting dust.
David, I really do appreciate all the time and effort you have given me. Many thanks.
Take care
M
If you want to learn AVR I'd get a JTAG model where debugging is the easiest of all. Wouldn't mess about with resource limited Tiny's or some even more limited models that don't have OCD at all.
Is it .NET or the operation of .NET?
Advantages of C# (.NET) and Java are those are memory-safe computer languages and the abstractions; disadvantage is the requirement for computer resources (CPU, memory)
The Visual Studio Code Arduino extension has EDBG; AVR GDB is a recent addition to Visual Studio Code.
Microsoft Visual Studio Code's hardware requirements are significantly less than that of Microchip MPLAB X.
I find that putting Java/.NET onto a PC has a similar effect to that of putting a millstone around the neck of a racehorse. They cripple PCs.
A professor said what one learns by creating with their hands is knowledge they'll remember.
I might 'borrow' that...
I'm short on fermentation process control (temperature, sourdough starter)
Me too. It might be fun finding out...
The simplest is a PMIC (no software)
There are PMIC with one or two power inputs, a Li-ion cell charger, buck or buck-boost SMPS, and an ideal diode or two.
There's likely a Pi Hat that will meet your requirements.
PMIC are common for arm Cortex-A and ARM9.
Some PMIC are designed to mate with specific arm application CPU or are already on a SoM.
Yea.
I have options.
I have an LiION battery holder, an LiION charge controller and several DC-DC converters to choose from. I could put together a 'unit' that the mains would charge as required, and that would provide 5V to the RPi. With a 2250mAh LiION battery and a nominal Pi consumption of 100mA, such a unit should keep the Pi alive for almost a day.
I have one of those 'battery bank' thingies which could probably be modified to do what is described above.
And I recently got myself one of these...
for a couple of Altairian Dollars.
That has all the electronics needed. ('They' seem to call it a 'battery shield'.)
But a power loss to the PI can be so catastrophic that I don't want to go through that again. I have had several recent power outages. And 'lost' the Pi on each and every one.
And so I did a little research.
And it is possible to send a signal to the Pi the 'tell' it to shut down. I have done those experiments, and that part works. A small micro with a single pin monitoring the LiION battery voltage could use another pin to generate the signal required to the Pi. With 2 pins, an ADC and a timer my Pi should be secure. Or at least secure from all but my experiments.
Besides, it challenges me to create again.
The hardest part might be to control 'mission creep'.
Hey, I thought this (getting my SNAP problems sorted out - having to engage with 'the outside world') was going to be tough. But is was enjoyable.
Thanks largely to you guys.
Keep up the good work.
Take care gchapman, and all.
M
https://www.avrfreaks.net/forum/avr-studio-mac-linux#comment-2600281
https://code.visualstudio.com/docs/supporting/requirements#_hardware
ATSAMA5D27-SOM1 - Microprocessors
But a power loss to the PI can be so catastrophic that I don't want to go through that again. I have had several recent power outages. And 'lost' the Pi on each and every one.
Raspberry Pi are popular due to a video camera interface, FOSS image recognition, and embedded use cases (therefore power failures due to battery malfunction or deep discharge)
But is was enjoyable.Thanks largely to you guys.
Flashing the Compute Module eMMC - Raspberry Pi Documentation
MicroSD Memory Cards - Swissbit
If you want to learn AVR I'd get a JTAG model where debugging is the easiest of all. Wouldn't mess about with resource limited Tiny's or some even more limited models that don't have OCD at all.
Ah, but the challenge is in getting control systems as lean, mean, as small as possible.
For me.
I know a guy who put a Porsche engine into a VW Beetle.
I'd be more interested in putting a Fiat Cinquecento engine into a Porsche.
And getting it to do what *I* needed.
M
As a Porsche owner/driver I cannot help but think I would never give up the almost unlimited power available to me when I actually need it. No one says you have to use it all the time but on the odd occasion it's nice to be able to push the throttle and know you will have extraordinary acceleration if you need it.
with Thanks! to mraardvark
for https://www.avrfreaks.net/forum/mplab-snap-atmega328pb-program-and-debugwire?page=1#comment-2673101
the ETN list
Engineering Technical Notes (ETNs) - Developer Help
was updated today to add
ETN36_MPLAB Snap AVR Interface Modification
MPLAB® SNAP AVR UPDI/PDI/TPI Interface Modification
...
I saw to remove the resistor. Haven't done it yet.
Mine gets a communication error when MPLAB (on a PC) tries to program. Hmm. I posted the error message at microchip's forum, but it hasn't been approved yet. I'll try again tonight. If it doesn't work with the peasea, I'll try it on the maque.
If I remember correctly I had a "communication error" the first time, then after launching a session with a PIC part I switched to an AVR and it worked...
If I remember correctly I had a "communication error" the first time, then after launching a session with a PIC part I switched to an AVR and it worked...
I probably won't switch to a pic to try it. Might have money for a new Atmel ICE soon.
Might have money for a new Atmel ICE soon.
Nevermind...
Torby, did a quick search on "mplab snap avr programming"
and that gave me this thread:
https://www.microchip.com/forums...
It seems to be interesting, not the first couple of comments, but later in that thread there is a long story the guy seemed to have tried a couple of things, perhaps have a read at that, and have a look at the search results given by google.
Torby, did a quick search on "mplab snap avr programming"
and that gave me this thread:
https://www.microchip.com/forums...
It seems to be interesting, not the first couple of comments, but later in that thread there is a long story the guy seemed to have tried a couple of things, perhaps have a read at that, and have a look at the search results given by google.
You mean the guy who replied?
" Please use Atmel-ICE, instead of MPLAB SNAP, to program Arduino. "
I'm thinking to buy a "full" Atmel-ICE since I'm interested in the SAM parts and I knew where the SAM cables were many moves ago. Then I'll protect the fragile connector and strap it to a board BEFORE using it.