Softeware serial issue


I am having an odd problem with the software serial: I am trying to transmit 0xAA out of the tx port on my Duemilanove, but it is transmitting a datastream far longer than a byte (maybe 80bits, who knows!). Also, 0xAA doesnt show up anywhere in this long stream of bits. I have also tried 0xF0 (11110000) and couldn’t spot that either.

Fortunately, I confirmed that it is transmitting at 9600baud and that there is 500ms spacing between transmissions - this means that the arduinio is at least not totally messed up!

The code is simple!

#include <SoftwareSerial.h>

uint8_t tx =1;
uint8_t rx =0;
uint8_t verReq[6] = {0xCC};
SoftwareSerial nss (rx,tx);

void setup() {

void loop() {

Does anybody know why arduino would behave this way?

Unfortunately at work i dont have access to photobucket so I cant provide you with photos. I can once I get home if anybody wants to see some screenies.

Thanks for any help :wink:


It looks like you are trying to get the software and hardware serial to use the same port pins. Try moving the software serial away from 0 and 1. Or don't create an instance of Serial in setup().

I thought those pins were designed to be used with softserial... How do I use hardware serial (link to tutorial?)? I am trying to communicate with an aerocomm transceiver. Is it not possible to use the serial over the usb and hardware serial at the same time? Are they the same circuit???

Thanks for the promt reply! 8-)


describes the use of the Arduino's built-in hardware serial. It uses the uart built into the Atmel chip which uses digital pins 1 and 0.

If you define pins other than 0 and 1 for your software serial, you can use both USB(hardware serial) and another serial port defined by SoftwareSerial.