Revert to standard UNO board back from Attiny

Hi,

As a newbie, I had a project that i wanted to use an ATtiny 25 - nice chip and i programmed the chip easily. I am now stuck as i do not know how to get back to a standard UNO board as the board has the ISP code on it.
I am sure i am missing something - I have looked through here but I guess my search terms are not as they should be...

Any pointers please?

Just upload any other sketch to the Uno. Every time you upload a sketch, the previous one is erased. So it's no problem to have the ArduinoISP sketch on your Uno.

Hi,

thank you, Tried to load Blink and it did not work

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to “Show verbose output during: compilation”
  • Check the checkbox next to "Show verbose output during: upload
  • Click “OK”
  • Sketch > Upload
  • After the upload fails, you’ll see a button on the right side of the orange bar “Copy error messages” (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

Thank you for looking at this!

OK so it seems I have found this - For the ATTiny to work I needed to put a 10uF cap on the reset pins - I had left this on thinking it would be OK ( I can hear you so oh yes...) I have removed it and....

Once again thank you for Looking at this my apologies for my error

I have a blinking Led now thank you.

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 930 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:C:\Users\Dave\AppData\Local\Temp\arduino_build_757632/Blink.ino.hex:i

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6a
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Glad you got it sorted before I showed up - I read the second sentence and instantly knew what happened :stuck_out_tongue:

Here's the background of why:

When the USB serial port is opened the DTR line of the serial adapter goes low. This is capacitively coupled (through a 0.1uF cap) to the reset line of the chip, forming an RC-circuit with the 10k pullup on reset, thus pulsing reset low briefly. This has two effects:

  • When opening serial monitor, it ensures that your code runs from the beginning with the serial output available (otherwise, setup() would have run as soon as the sketch finished uploading, then you'd open serial port, but setup has already run, so you wouldn't see any output from that in the monitor)
  • When you want to upload a sketch, you need to reset the chip so that the bootloader runs (it's active for around half a second IIRC on an Uno); the autoreset circuit achieves this.

But when using Arduino as ISP, this is a problem - avrdude opens the port and starts trying to talk to Arduino as ISP sketch - but the sketch isn't running at this point, the bootloader is. Optiboot runs at a different* baud rate, receives gibberish, and while it tries to jump to the application when it sees wrong-baud-gibberish - but it's too late, characters have been lost, and avrdude reports a sync error.

By putting a 10uF cap between reset and ground, you prevent the pulse on reset (as there is a cap 100x as big as the one between DTR and reset fighting to keep the voltage on reset from changing). This is desirable when using Arduino as ISP - but is bad for most any other purpose.

*On I think the Pro Mini, the bootloader runs at 19200 baud, same as Arduino as ISP. They use the same protocol too; in this case, it proceeds until it reads the signature, and seeing that the signature is that of an atmega328p instead of (for example) an attiny25. Unless you're trying to program a '328p, in which case it tries to write whatever you told it to upload to the pro mini (which will succeed if it's a sketch, and fail if it's the bootloader).

Thank you so much for your time in this response.

I was not sure of what the cap was supposed to do. It is a reset after all, and sometimes a C/R network is good for power ups'

Anyway thanks again - I will continue - loving the tiny and now looking at the 14 pin part too.

DJH55:
Thank you so much for your time in this response.

I was not sure of what the cap was supposed to do. It is a reset after all, and sometimes a C/R network is good for power ups'

Anyway thanks again - I will continue - loving the tiny and now looking at the 14 pin part too.

Glad to hear it. Are you using my core? There is a lot more to the ATtiny family than the 24/44/84/25/45/85/2313/4313 that most cores support, and my core supports all the ones with a variant that has more than 2k of flash and has classic AVR peripherals (ie, not the new ones with the CIP's like the chip used in the Uno WiFi Rev2) - it also provides working Servo library for all the parts, and Wire/SPI libraries that you can use just like the ones on normal AVR boards. GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8