Rx and Tx pins on Arduino

Hi I'm trying to make a simple circuit witch will send ASCII symbol to PC over RS232. I looked through some tutorials (like this one: http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232) and always there are some other pins used for Rx and Tx.

So I was wondering: What are Rx and Tx pins (in Digital Pins section) for ? Can I just hook those to to RS232 ?

thx

Pins 0 (receive) and 1 (xmit) are assigned to the built in hardware UART of the AVR processor chip. They can not be wired directly to RS-232 as they are TTL (0-5vdc) levels and RS-232 is bipolar and higher voltages. A voltage conversion chip like the MAX232 is required to directly wire to RS-232 voltage.

There are also Arduino software library routines that allow serial communications on any digital pins via software functions that emulate what the hardware UART does. They would still require voltage conversion for direct RS-232 hookup.

Lefty

Maxim will provide free samples of the MAX3232 chip in the DIL package. This is suitable for use with the breadboards.

Note MAX232 chip is obsolete but the name is a generic term for a 5 volt (TTL) to RS232 (+ and - 12V) converter.

You only require 4 electrolitic (large) capacitor to get this to work.

Matt B

Note MAX232 chip is obsolete

Eh? Still in production, isn't it?

I prefer the 232A variant, for the smaller caps, or the 3232 which will work on 3.3V.

-j

Sorry, I am most likely wrong. I just can't remember the MAX232 deing available when I ordered my samples :-/

I will try and check in future BEFORE I put my foot in my mouth.

Matt

Sometimes production stuff isn't available for samples. Maybe you can't sample the 232 becasue they want you to use the 232[u]A[/u], or the 3232?

No big deal. Some variant of the 232 is definitely the way to interface serially.

-j

I don't want to steal the thread, but have a related (totally newbie) question.

Is it safe to say that digital pins 0 and 1 should NOT be used for anything else besides serial communication?

Are there any other "reserved" pins in the standard headers?

Is it safe to say that digital pins 0 and 1 should NOT be used for anything else besides serial communication?

No. You can use them as standard digital IO pins, you just can't use them for serial communications at the same time. I don't think there's a good way to switch back and forth, either.

-j

Is it safe to say that digital pins 0 and 1 should NOT be used for anything else besides serial communication?

Are there any other “reserved” pins in the standard headers?

Not really. Pins 0 & 1 can still be used for applications other then serial communications. One just has to keep in mind that external components wired to pins 0 & 1 may prevent successful uploading from the Arduino IDE, unless there is means to disconnect them. If one is using say a shield for all external components then it would be pretty simple to remove the shield if future uploads needed to be performed.

Pin 13 has a LED and series resistor to ground, so if it was to be used as an input pin then the driving circuit would have to be able to provide the drive current that the LED/resistor would draw.

Many of the AVR I/O pins serve dual functions as well as being general purpose I/O pins. Pins 2 & 3 are available as user interrupt input pins if desired, and all the analog input pins can be utilized as digital pins if desired. Different I/O pins are supported by internal timers, some 8 bit, some 16 bits.

Lots of this info is in the Arduino reference and playground sections on their site. Also the AVR data sheet is the ultimate bible for all hardware features of the chip.

Lefty