that was perfect
Glad I was able to help! Please take the time to update your post on arduino.ir with what you learned so that others can benefit from this information.
Hex code has been made in the past. In this way it is possible to transfer? Using Arduino as isp
Yes, if the hex file was compiled for the hardware you're using, but you can't do it using the Arduino IDE. You will need to use AVRDUDE from the command line. AVRDUDE is included with the Arduino IDE, it's the tool used for Upload, Upload Using Programmer, and Burn Bootloader on all AVR microcontrollers.
To make it super easy you can use the Arduino IDE to generate the command you need to run from the command line by uploading a blank sketch to the microcontroller:
- Plug the Arduino as ISP into your computer.
- File > New
- File > Preferences > Show verbose output during: > upload(check) > OK
- Tools > Board > ATtiny13
- Tools > Programmer > Arduino as ISP
- Tools > Port > select the port of the Arduino as ISP
- Sketch > Upload Using Programmer
- After the upload completes scroll up the black console window in the bottom of the Arduino IDE window until you see the AVRDUDE command at the start of the uploading process. It will look something like:
E:\ArduinoIDE\arduino-1.8.1\hardware\tools\avr/bin/avrdude -CE:\ArduinoIDE\arduino-1.8.1\hardware\tools\avr/etc/avrdude.conf -v -pattiny13 -cstk500v1 -PCOM21 -b19200 -Uflash:w:C:\Users\per\AppData\Local\Temp\arduino_build_882863/sketch_feb05a.ino.hex:i
- Highlight that command in the console and copy it to the clipboard.
- Open the command line on your computer.
- Paste the command to the command line but change the filename (C:\Users\per\AppData\Local\Temp\arduino_build_882863/sketch_feb05a.ino.hex in my example) to the hex file you want to upload.