Notifications
Clear all

How to upload a .hex file to an ATtiny45

12 Posts
4 Users
2 Likes
6,865 Views
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

Recently I had found an intersting project on youtube,that uses an ATtiny45,but the problem is that it uses a .hex file and I had tried to use Xloader,but it freezes and works only with Arduino Uno,Mega and nano.Can someone help me?

Here is the original video:

and .zip file with .hex file: https://drive.google.com/file/d/18RHu1mRysgIyZgAZpnH1My8_tV7FsqGi/view


   
Quote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Hi @wintech,

You will need to use avrdude to load it.  This will also require a programmer like the USBasp. The programmer is very inexpensive and can be found online for usually less than 5$USD.

As for avrdude, you will need to get the AVR gcc toolset for whatever OS you run.

Scott


   
ReplyQuote
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

Thanks a lot!!!But I have question,how do I use AVRdude or AVR gcc?

This post was modified 5 years ago by wintech

   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Something similar to this from the command line: avrdude -c usbasp -p t45 -u -U flash:w:yourfile.hex

Also, there are a couple of avrdude tutorials about on the net.

Hope this helps,

Scott


   
ReplyQuote
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

@jscottbee thanks!!!!!


   
ReplyQuote
NewburyPi
(@dale)
Member
Joined: 5 years ago
Posts: 97
 

Not sure if this would help your specific situation,  but I've programmed ATtiny85/45s with this method. 

--
Dale


   
ReplyQuote
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

@newburypi thanks


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 

@wintech Let us know how you make out and which method you ended up using.  I can learn from your experience.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 
Posted by: Robo Pi

@wintech Let us know how you make out and which method you ended up using.  I can learn from your experience.

For precompiled hex files, you will need avrdude or AVRStudio and an ISP.

Scott

This post was modified 5 years ago by jscottbee

   
wintech reacted
ReplyQuote
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

Sorry @robo-pi for my late reply.I will do @jscottbee's method(USBasp and ATMEL studio 7)

This post was modified 5 years ago by wintech

   
ReplyQuote
wintech
(@wintech)
Member
Joined: 5 years ago
Posts: 32
Topic starter  

I've found this great tutorial on youtube

 


   
NewburyPi reacted
ReplyQuote
NewburyPi
(@dale)
Member
Joined: 5 years ago
Posts: 97
 

Yes. This is the best video I've found on USBasp. I've been using Arduino IDE and PlatformIO as well. Things get a little hairier when using Linux, but can be fixed up with some quick command-line work. 

--
Dale


   
ReplyQuote