Pages: [1]   Go Down
Author Topic: Can I use my Arduino as a usb - rs232 converter?  (Read 588 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a Basic Stamp 2 microcontroller and I need a usb - rs232 converter to program it. I bought an Arduino Uno and I see that it is seen by the computer as a COM port. Can I program it to connect my Basic Stamp to the computer?? smiley-lol I'm less than a newbie in Arduino's world.. what I have to do??
Thanks a lot..!
Davide
Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm sure it would be possible, but wouldn't it be cheaper and easier to just buy one?
http://www.ebay.co.uk/sch/?_nkw=USB%20-%20RS232%20convertor&clk_rvr_id=287899086462

RS232 uses -+12V signals; USB uses -+5V signals. That's one thing to account for. Also, it is not your standard TTL interface. The problem will be changing the voltage levels. It is possible to buy a TTL to RS232 chip. The arduino can output TTL data to it, which would work. I'd still use a bought one though, then use the arduino instead of the basic stamp  smiley-lol .

Onions.
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm sure it would be possible, but wouldn't it be cheaper and easier to just buy one?
http://www.ebay.co.uk/sch/?_nkw=USB%20-%20RS232%20convertor&clk_rvr_id=287899086462
I've also bought a cable like this on ebay.. but it can't work because of the differents standards (I read..).

Also if Basic Stamp 2 should be programmed by a serial cable (rs232) I know that the board includes a rs232 to ttl converter. If I program the arduino to listen on the serial interface (I don't know how) and to repeat it on a different pin (connected to the other microcontroller) should it works?? Can you teach me how to do?? Thanks..!
(I want to use a basic stamp instead of the arduino because I bought it years ago.. and I want to use it.. smiley-lol)

Davide
Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to use the arduino and talk to it via USB, you'll need to look into Serial.begin and so on. When you send data to the arduino (open up the IDE, open up Serial monitor, type data into the bar at the top then press send), it will be converted to TTL by the FTDI IC. You may be able to connect the TTL serial output to your basic stamp and program it like that...
The problem is that you may end up trying to upload the program to the AVR on the arduino. That won't work. In order to get around that, you can simply unplug the IC on the through-hole, or desolder the IC on the SMD version.
Another alternative is to buy a USB to TTL convertor designed to upload a program to a pro mini, then use it for the basic stamp instead.

Try out some of the serial examples, then you can get some idea about communication.

Onions.
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Where you located electon tube?

Pick up an RS232 driver and 4 caps
for example
http://www.dipmicro.com/store/ST232CN
wire it up, then bring in serial info from USB port to the Serial pins (D0,D1)
use NewSoftSerial out to the RS232 to your Stamp.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: