Manipulation of PORTD (RX/TX)

Hi there,

I have a question related to bit-manipulation of PORTD.
If I change - hopefully not - the data direction register of pin 0 (RX) or pin1 (TX). Do I still have the ability to communicate (flash) with my arduino board? Can I reset this change or does it not affect the flashing process?

Have a nice day

Eric

If you rely on Arduino's USB-to-Serial to upload your sketches, I'd recommend not using those two pins.

Even though in theory, you could hold-done the reset button right before you are going to upload the sketch, it doesn't work all the time and depend on your particular code, the activities on those two pins sometimes confuses Arduino's bootloader.

I have a question related to bit-manipulation of PORTD.
If I change - hopefully not - the data direction register of pin 0 (RX) or pin1 (TX). Do I still have the ability to communicate (flash) with my arduino board? Can I reset this change or does it not affect the flashing process?

The fact that you change the pin 0 direction bit in software does not in itself effect the ability to later upload another sketch. Upon a manual, automatic, or power-up reset all pins default to input pins and the bootload sets up the pins that it needs to perform serial comm to the Arduino IDE. The problem can be if you have anything electrically wired to pins 0 and 1 then that may interact with the pins during serial comm. A wiring drawing would have to be provided to see if it was going to be a problem or not.

Lefty

Or just disconnect the external circuitry prior to programming.
I have prominis built into a lot of things, I put pins on them and install them into sockets so I can pull them out for guaranteed no-interference programming.
Here's one with wirewrap sockets with some other parts. I built this up in just a few hours.