How does the Arduino Uno use its USaRT?

Hi All...

I see that the Arduino Uno with the 328p CPU has one USaRT built on to the 328p chip. I also see that if I use NewSoftSerial and specify pins 1 and 2, I can use it to talk out the USB port.

Is the USB port wired to the USaRT in the 328p? Or is it available for communication with another device?

the uart is indeed connected to the usb connection (Through a serial converter), but if you arent using the usb connection you can use it to connect to something else. it wont interfere so long as they both arent active at the same time.

skyjumper:
if I use NewSoftSerial and specify pins 1 and 2

It would be possible, but highly unconventional to use newsoftserial on pins 1/2. These are wired to the UART, and therefore hardware serial would be most commonly used. NewSoftSerial is a software bit-banging serial implementation, which while good for many things, also has a lot of limitations compared to the UART. These pins are wired to the USB/Serial bridge -- if your Arduino has one, but the bridge will go hi-z if it is not connected to a USB hub, and pins 1/2 are then completely usable TTL level connections to the on-board UART.

The principle built-in use of the UART in Arduino is as the conduit for talking to the bootloader. In the reset sequence the bootloader looks to see if there is an Arduino programmer attempting to download new firmware -- this is what happens when you select "upload" in the IDE.

Once you sketch is running, it is totally up to you what, if anything, is done with the hardware UART.

It is a common inconvenience (for me at least) that the UART is wired to the USB, as most of my projects want to talk via harware serial to something else, and swapping the single UART between my hardware and the USB for programming requires disconnecting my hardware from pins 1/2 for programming to work. I have found that debugging hardware project requiring the UART to be easiest on a Mega, which 4 UARTs and in conjunction with a bus pirate.

Thanks Gardner, thats a big help. I think I'll just add the MAX232 chip and use NewSoftSerial for talking to devices connected through it.

Pins D0, D1 are the USART/USB pins, not D1/D2.
I also keep D0/D1 out of my Promini/328-based designs so they are available for sendingout debug info via serial.print statements.
If I do need to use the Rx/Tx serial ports, I put the promini in a socket so that I can pull it out for programmig.