An alternative Serial Library for Arduino 1.0

Do you have anything connected to port1? If nothing is connected, you could get really high speed framing errors on port1 from noise.

I put a wire in RX1 and get your result and the RX1 buffer is full of junk.

You could try connecting RX1 to 5V so it appears to be connected to an idle port. Serial ports idle HIGH.

Edit: There is a bug when the RX1 buffer is full. I don't clear the interrupt when I can't buffer the character.

Here is a fix for the receive ISR:

//------------------------------------------------------------------------------
static  void rx_isr(volatile uint8_t* udr, SerialRingBuffer* pb) {
  uint8_t b = *udr;
  uint16_t tmp = pb->head + 1;
  if (tmp >= pb->size) tmp = 0;
  if (tmp != pb->tail) {
    pb->buf[pb->head] = b;
    pb->head = tmp;
  }
}

I posted the fixed version as SerialPortBeta20111231.zip here Google Code Archive - Long-term storage for Google Code Project Hosting..