How to program RXD and TXD as normal I/O pin?

Hi,
Using a Arduino Pro Mini, I've connected RXD and TXD as normal I/O pins. However, the IDE returns an error on:
pinmode(RXD, OUTPUT);
pinmode(TXD, OUTPUT);

This seems no problem for the other preprogrammed pins....

Is it possible or not?

Regards,

Cervotek

Your post was MOVED to its current location as it is more suitable

Either use the pin numbers (0 and 1) instead of the names printed on the board or define the names yourself in the sketch

Thx, I just looked indeed to find that. Sorry for the silly question ...

Note that having something connected to pins 0 and 1 may interfere with the ability to upload code to the board and, of course, you will not be able to use the Serial monitor for data input or output

Citaat
Note that having something connected to pins 0 and 1 may interfere with the ability to upload code to the board

Those pins are connected to the input (CLK + DATA) of a serial/parallel converter 74HC595 circuit. Should that oppose a problem?

It seems no problem as the programming procedure goes just fine.
Thx for you help!

Do you actually need to use pins 0 and 1 for that purpose ?

Have you used all of the other digital pins on the board and if so, what for ?

Sorry for the late reply.

"Do you actually need to use pins 0 and 1 for that purpose ?"

No, but those lines are the closest to the circuit they need to be used for. That is the most interesting for EMC as they will hold frequency signals.

"Have you used all of the other digital pins on the board and if so, what for ?"
Almost all, they're used to control a stepper driver and to read some buttons.

The system works just fine using the TXD and RXD as regular port lines. I can even still use the Serial commands but cannot use them then as port lines of course. This because the connected circuit lines are input only.

What I had in mind if you had run out of purely digital pins was to use a couple of the analogue pins as digital pins

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.