Go Down

Topic: [Solved] Blocked my Serial pins? (Read 360 times) previous topic - next topic

3dprinter

Sep 20, 2019, 07:44 pm Last Edit: Oct 07, 2019, 04:33 pm by 3dprinter
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 ?



Budvar10

#1
Sep 20, 2019, 07:55 pm Last Edit: Sep 20, 2019, 08:01 pm by Budvar10
This could be a problem with uploading if something is connected to 0&1 pins. :(

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

Something for your inspiration:

Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

3dprinter

#2
Sep 20, 2019, 08:10 pm Last Edit: Sep 20, 2019, 09:20 pm by 3dprinter
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.

Dude, no offence but your design is ugly. :)
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 ;)

Budvar10

Quote
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 ;)
I understand what's your point. You have a karma. :)
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

DrAzzy

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.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

3dprinter

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 )

Go Up