ATTiny1604 with usbasp and AVRDude

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

I think I may have made a mistake here. I am using Atmel Studio 7.0.2397 with AVRDude and a USBasp (even have the little shortcuts setup in the tools drop down!). The first version of the project I am working on was using a ATMega328pb and everything was working great. At some point I realised a ATTiny would be a better fit and instead of using an 85 I thought it would be a great idea to use the new and improved 1604!

 

This actually seemed like a great idea so I redid everything thinking it would be easy to modify the program for the new ATTiny. I literally had not even considered AVRDude might not support the chip. I redid the PCB and have been migrating the code over and BAM! AVRDude does not support the 1604.

 

Is anyone aware of a way to fix my toolchain? Is there a way to help AVRDude know what to do here? Can I go around AVRDude? Is there a supported chip that is similar enough that I can just use that part for AVRDude? I really cant afford a $300 programmer today and I had no idea I had walked into this.

 

Its been a while since I have been here so I was hoping the prodigal son could beg for forgiveness and see if the experts had any ideas for me. I really stepped in it, Any help would be greatly appreciated, Thanks in advance.

This topic has a solution.
Last Edited: Thu. Jul 23, 2020 - 09:37 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The modern tiny/mega are not really tiny/mega at all. They are derived from Xmega. The Xmega chips are not programmed by ISP but by either JTAG or PDI. When they took the Xmega technology and rebranded it back as "Tiny"/"Mega" (possibly the most confusing thing they have ever done) they refined PDI to be "UPDI". So to program these "Xtiny" (as some call them!) you are going to need a UPDI programmer.

 

Life may be easiest simply to get a $15 "Snap" from Microchip.

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

Thanks! That works, set me back a couple days but that's better than $300 for a new ICE. Hey one last question, does this mean I will need to migrate to the MPLAB X IDE or can I use it with Atmel studio? I guess I should have seen the writing on the wall LOL.

 

Hey thanks for the answer, I have the programmer on the way.

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

hotrhodium wrote:
does this mean I will need to migrate to the MPLAB X IDE or can I use it with Atmel studio?
I lose track. Some combinations of these things work but they keep improving support for interfaces in the two programs.

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

AS7.0 will work fine with the SNAP.

 

Note that the original SNAP pcb requires a small hardware mod for PDI and UPDI.

I guess that later pcb revisions might fix this.

 

When the SNAP arrives,  post the full Serial number.

 

David.

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

hotrhodium wrote:
AVRDude does not support the 1604.
http://svn.savannah.gnu.org/viewvc/avrdude?view=revision&revision=1405 though could quickly locate only AVRDUDE 6.3 in some Windows packages.

edit2 : copy AVRDUDE from Arduino

https://github.com/facchinm/avrdude/blob/master/avrdude.conf.in#L15550

hotrhodium wrote:
Can I go around AVRDude?
Yes though AVRDUDE can go via a USB UART to UPDI (akin to a one-wire UART)

edit : Arduino

STK500 to UPDI is working! (was: Enabling XTiny UPDI) | AVR Freaks

UPDI programmer software for Arduino - compatible with avrdude | AVR Freaks

edit : USB UART

pyUPDI Helper - New tool available | AVR Freaks

 

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

Last Edited: Thu. Jul 23, 2020 - 05:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP has already ordered a SNAP.

 

The SNAP should work seamlessly with AS7.0 or MPLABX and Atmel/Microchip command line tools.

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

Ok I think I understand. I can update AVRDUDE and still use it to target the new chips but the USBasp is not going to work for me unless I update the USBasp to work with UPDI or just load this onto an arduino.

 

That is awesome but a very advanced project for later.

 

I am naively moving towards what I hope can become a production device so knowing that exists and is possible is very helpful. Years ago I had an arduino loaded with a hex file that it would program onto a connected chip when a button was pressed. I'm thinking something along those lines so I don't need to run to a computer every time I want to flash a chip.

 

Thanks for the info but in the interest of moving forward in a timely manner I will just try to get a supported toolchain working. If I move in that direction I will post progress here for a reference to the next person.

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

On another note I found an Atmel ICE I was able to borrow. I also purchased the SNAP so I should have plenty of ways to get this working now.

 

Knowing the new ATTinys are based on the XMegas is also something that will be very helpful, I had no idea. I picked the new one because I wanted to use the RTC as the input for my timer/counter and now I know why that is possible. Thanks All.