My new experiments on July 18 on this subject have been added to this modified post.
July 16 2014
I am vary new to arduino use. I want to mount a rs232 shield on my arduino board, but I understand, to upload a program I need to
1 - disconnect power
2- remove the rs232 shield
3., upload program
4- reinstall the rs232
5 - reconnect power.
Now being new to arduino programing ( I am trying to serially interface with a crestron processor, on which there is vary little info on).
I will spend more time doing the above routine then programing.
What I want to know is "Can I put a switch on the pins that both the usb and rs232 use for communication, so I can toggle between them"?
Thank You!
Ron Derkis
Appended July 18 2014
I love to experiment! These are my findings.
1st - I got the three 1-wire temp probes working, and broadcasting thru the arduino USB port.
2nd - I mounted a RS232 shield on the arduino uno, leaving the power pin bent out.(No Power to RS232)
I was able to upload and run programs reliably with this configuration. Reading output thru the USB port com 8.
3rd I put power to the RS232 power pin. Upon running the RS232 temperature probe program again, I was startled to find that the temperatures were being broadcast to both the USB and RS232 ports at same time. The USB was on com 7 and the RS232 on com 8.
Here is my latest question. Is there enough power on one of the digital out pins (40 ma) to power the RS232? How about If I hooked 2 or 3 in parallel? That way I could turn it on and off with my program. Uploading programs with out disconnecting anything :-)
I am new to the arduino but I don't understand why it would be hard.?
I have not even soldered the header pins on the rs232 yet. Couldn't I just put a switch on the rs232 's power supply pin or on the communication pin between the shield and the main board?
Or perhaps your talking about the physical location of the switch and not the wireing.? I plan on using a bread board with the arduino, so the switch could physically be located there.
BTW I really appreciate you help! and am just trying to understand. I have found what seems logical to me, is often not born out by experience.
When you said "Arduino with shield" I assumed you meant an Arduino with a shield on it (silly me!). It's hard to put a switch between an Arduino and a shield.
All you need is to break the RS232 connection to the shield (it's Pin 0 and Pin 1 of the Arduino). If you can get a switch in there, go for it.
Like I tried to say, the switch will go on the breadboard. But would it be better to put the lead to the switch on the pin for the rs32s power supply, or wouldn't that work?
Once I learn what I am doing and get the program working, I will probably remove the switch.
Ok, one last thought (came to me last night in a dream Can I run the 1 and 2 pins somehow thru the other pins on the arduino so the arduino program itself choses when to send USB or RS232 data by closing and opening internal relays? I think I could do that easily with the rs232 power pin if it would have worked.
I can't believe I can't find anything posted on this anywhere on the web.
rderkis:
Ok, one last thought (came to me last night in a dream Can I run the 1 and 2 pins somehow thru the other pins on the arduino so the arduino program itself choses when to send USB or RS232 data by closing and opening internal relays? I think I could do that easily with the rs232 power pin if it would have worked.
No, but you could run them though something like a 74HC125 and enable them in your sketch when you need to talk to the shield. This would automate it.