Pages: [1]   Go Down
Author Topic: reuse serial?  (Read 639 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



Is there any reason I cant re use RX and TX as momentary switch inputs since I'm out of pins?
I don't specifically ever use serial transfer in my sketch.

Also, If I did use serial, and TX was pulled to ground accidentally, would that cause any damage? I assume the hardware ports are protected. 

Of course, if I pull down RX, the sketch wont load via USB.

Comments?

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33379
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I assume the hardware ports are protected. 
No.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are issues with the pull-up resistors used on those pins. In principle you can use them if you want to. In my VGA output test documented here:

http://www.gammon.com.au/forum/?id=11608

Towards the bottom of the page I used pins D0, D1 and D2 for RGB signals to the monitor. So yes, it can be done. But for inputs - caveat - check the schematic for the pull-ups. I think you can probably work around them. For example, if they have pull-ups, ride with it, and make your switches ground the pins. Make sure if you do this that you don't happen to turn Serial on (eg. Serial.begin) because then you may damage the pins.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


What if I was receiving data to the Arduino and I had RX pulled low at that time by a switch. It would present a short to the output of the programmer. Not good.

I think that maybe to use RX as an input, I should use a 1k res->switch-GND from RX pin. Set the chip to pull up pin 0.
To use TX as an input, same thing, in case TX was enabled accidentally and my switch was pulling TX low. Set the chip to pull up pin 1.
 
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nick,
Your video project looks really nice. Do you have an easy suggestion if I just want larger letters or numbers on the screen?

Or maybe just a single large number?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Responded to here:

http://arduino.cc/forum/index.php/topic,102181
Logged

Pages: [1]   Go Up
Jump to: