Programming AVR-0 Devices?

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

OK, we shift from DebugWire to UPDI with the Mega4808/9. 

 

What are the recommended programming devices for this new system? It seems like there were some that almost worked, or only worked with specific IDEs. Yes, I have heard of pyUPDI but I have no clue what its intended function is. Do some UPDI programmers only work with Studio and some only work with MPLAB X?

 

Where can I find the programming connector pinout? I have been through the megaAVR 0-series Family Data Sheet and was not able to find anything. 

 

Thanks for your help!

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

microchip PICkit4 works with MPLAB X, apparently

 

I bought the PICkit4 ($35 til nov 31 IIRC) and downloaded and started up MPLAB X but have not tried on my 4809 chips yet.  (I am used to command line tool approach.)

Last Edited: Tue. Nov 19, 2019 - 02:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel ICE will program the AVR-0 family

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Does ICE work with both Studio and MPLAB X?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

I've had reasonable luck with PICKit4, MPLab SNAP, and elTangas' jtag2updi/avrdude program running on an ArduinoIsh thing.  (mostly using MPLabX as the IDE, but also Arduino/MegaTinyCore.)

It's a one wire interface with a dedicated pin on the 4808/4809, and most of "us" designing hobbyist boards are using a simple 3pin 0.1inch inline connector VCC/GND/UPDI.  (I think there's a suggested standard from Microchip using the same popular 6pin ISP connector, but the PicKit and SNAP have a weird connector anyway, so you need to build an adapter.   And SNAP has that 1k pullup requirement.)

 

What's currently NOT working is the "high voltage" programming that you need if you want to use the UPDI pin on a Tiny0 or Tiny1 chip as GPIO or RESET instead of UPDI.  It seems that only the PICKit4 has the hardware to generate 12V, but the software and firmware is ... behind.  (maybe Atmel ICE as well?)  AVRDUDE support is also somewhat behind

 

I haven't tried Studio, or the Atmel programmers (other than the ones built into Curiosity Nano and Xplained Pro dev boards.)  MPLAB has little colored dots to indicate the support level for each programmer/chip combination, and the Atmel programmers don't look very promising.  :-(  Since my preferred development platform is a Mac, I only use Studio for emergencies, or projects where Studio support is specifically required.

 

 

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

ka7ehk wrote:

Does ICE work with both Studio and MPLAB X?

 

Jim

 

Not sure as I am still in the early stages of MPLABX.  I cannot get SNAP boards to work, and The Pickit4 pissed me off when I learned I need to make all sorts of adapters to user the effer.

 

I think there is a thread mentioning that the ICE will work with MPLAB, but if you have the ICE, and you have a PC laptop with Studio on it you are good to go.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

PyUPDI is for a hardware UART that the host PC can control; the UART needs to run at the same voltage as the UPDI pin, and a resistor is required.

 

https://github.com/mraardvark/pyupdi

 

I have a project in one of the bins at my bench, waiting for me to build and try the Raspberry Pi hardware UART with that setup and an m4809. I guess you would run pyupdi from AS7 the same way avrdude can be. I use Makefiles, so not much help with AS7.

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

Part of what I was hoping to find already exists on the Microchip web site. Its a table of programming "tools" and programming protocols, showing what works with what:

 

https://www.microchip.com/develo...

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Seems you have it all figure out, but just to wrap it up:

 

The following tools support UPDI:

AtmelICE, PowerDebugger, JTAGICE3, PICkit4, SNAP (with a HW modification) and all the different variants of EDBG.

All of them are supported in both MPLAB X and Studio.

 

The only tool that currently properly supports UPDI High Voltage activation, bringing back the UPDI functionality if the pin has been configured as RESET or GPIO (Valid only for tiny0 and tiny1. Not for the mega0's which have dedicated UPDI pin), in both MPLAB X and Studio is PowerDebugger. The PICkit4 will also support UPDI High Voltage activation once it gets a FW update.

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

>SNAP (with a HW modification)

 

You don't need to modify the snap, unless you consider adding a 1k pullup resistor to the updi line a hardware modification. I have been using a snap for weeks on a mega4809 without a single error in that configuration.

 

A $15 mega4809 curiosity nano is all you really need to get started. You can delay any other decisions until after the led is blinking. The snap or pk4 is a good next step, but can wait.

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

Glad to see this collected in one place.

 

Thanks

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net