MAX232 + Arduino

Hey All,

I have a functioning MAX232 based board running (i know it works because when i short rx/tx with it open in minicom it will spit my data back to me)

Anyway, I need to hook it up to my Arduino Diecimilia. Eventually I will create a mini token ring (Computer -> max232 -> Arduino 1 -> Arduino 2 -> max232 -> Computer) However, that is step 2. Step 1 is going from the max232 to arduino and back.

From what I've read, Digital 0 (rx) and Digital 1 (tx) can be used with the Hardware Serial stuff. How do I get that going? I really want to be able to do this, and I definitely am not able to use SoftwareSerial since I need to be able to do async Rx.

Do I just plug them together? Perhaps its a noise issue? I just noticed that occasionally a command will come through.

What do you mean by "Hardware serial stuff" and "Software serial stuff"?

Hardware serial is the built in serial port on the Arduino. Software serial is a library you can use to have an ekstra serial port on other pins than those dedicated to the HW serial. The Sw serial has a max speed of 9600 though.

You can read about it in the playground.

So, back to my original question: How do you use the Hardware Serial on digital pins 0/1? Is there any sort of configuration you have to do? Or can you use them exactly how you use the USB<->Serial stuff. (ie: Serial.begin(9600); Serial.print('foo'):wink:

Thanks!

You don't have to do anything except follow the datasheet. Hook your your ttl level i/o up to it and you are good. Needs a five support parts.

I don't think you can daisy chain rs232. For a serial network look at rs485.

If you use it with an arduino programmed chip it will work just like the USB but needs a real serial port. All the commands will work the same.

I'm not certain, but if I remember right, you won't be able to use the built in RX/TX pins (0 and 1), if you are connected via usb as the same time.

maybe this picture will clarify what i'm trying to do: http://farm3.static.flickr.com/2336/2127878708_5586da9c48_o.png

i have the max232 board made, i have the arduinos. i just need to know if there is some obscure step i'm missing to use the normal hardware serial function on digital pins 0/1. there will be no USB involved at all.

No, you don't need to do anything different thatn if you were talking over the USB connection.

As far as the AtMega chip is concerned, it just puts out the serial messages on pins 0 & 1. on the arduino, those pins happen to be hardwired (on the circuit board) to the USB converter chip. If you choose not to connect the arduino by USB, and instead have another serial device, in your case a MAX232, that's where the messages go.