[Solved] Blocked my Serial pins?

So I have made this sketch that in setup() sets pin 0 and 1 to output. It actually sets EVERY pin to output, except A5. (It runs on 8Mhz internal so even the crystal pins are set for output)

This is a raw atmega328 chip, where I have changed to the optiboot loader. This has the nice feature that it starts the sketch near instantly on powerup (the older bootloader looks at serial interface a while before starting the sketch)

Oh, and the chip is not on an Arduinoboard or any other pcb/breadboard, it is freeform wired - a blinkey-sculpture thing. The picture shows it without the LEDs


(I have made smaller blinkey-sculptures, where the 0 and 1 pins are unprogrammed, so there I have no problem uploading new sketches)

Now, I have burned out one programmer (USB/Serial FTDI board) already, so how can I go about reprogramming it? Some resistor setup, holding reset low, .... or ?

This could be a problem with uploading if something is connected to 0&1 pins. :frowning:

P.S.: Dude, no offence but your design is ugly. :slight_smile:

Something for your inspiration:
4x5pa9purq4y.jpg

4x5pa9purq4y.jpg

Budvar10:
This could be a problem with uploading if something is connected to 0&1 pins.

Yes, I could un-solder just those two pins for programming - which will be just once or twice more. (My next program version will contain a 5 second delay in setup() in the hope that is enough for me to ground/release the reset so it coincides with the programmer uploading.) As it is now, the second I let go the pins are OUTPUT,LOW sinking/damaging the programmer pins.

Budvar10:
Dude, no offence but your design is ugly. :slight_smile:

None taken. Beauty is in the eye of the beholder 8) The design is meant to show all wiring and is part of a series. It's also called Dead Bug Wiring as the legs stick up :wink:

Beauty is in the eye of the beholder 8) The design is meant to show all wiring and is part of a series. It's also called Dead Bug Wiring as the legs stick up :wink:

I understand what's your point. You have a karma. :slight_smile:

I'm surprised/skeptical that it has actually managed to damage a serial adapter. The vast majority of serial adapters, even cheap ones, put a resistor in series with the TX and RX lines, so that even if connected to something trying to assert the pin the opposite to how the serial chip is, the programmer won't care. In fact, I don't think I've ever received one that didn't. I've made my own that didn't based on CH340G, and I'm sure I've abused them (eg, serial chip's TX shorted to ground while idle) plenty of times - and yet I've never had one fail on me.

Info/followup

I "risked" another Serial board, after having unsoldered the LED column on the pin 0 and 1. Reprogramming worked fine.

Conclusion: Having a program that drives pins 0/1 High/Low does not prevent one from connecting a FTDI and using the standard serial upload. Having some load connected may be too much for the FTDI, both in terms og getting the pins to voltage so the serial protocol works, or loading it's pins too much.

NB/side-info: And now I have PB6 and PB7 as ordinary I/O pins, too (they are connected to the Xtal on the Arduino board, so it only works on your own pcb or freewire, and with adifferent bootloader and you have to use stuff like DDRB |= 1 << PB7 and PORTB &= ~(1 << PB7) in your code )