I got error while using the software serial example in arduino1.0.5-r2

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

Serial.println(“Goodnight moon!”);

// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
mySerial.println(“Hello, world?”);
}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}

When i compile above code, got following errors

C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function ‘void SoftwareSerial::begin(long int)’:
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:399: error: ‘PCICR’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: ‘PCMSK2’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: ‘PCMSK0’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: ‘PCMSK1’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function ‘void SoftwareSerial::end()’:
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: ‘PCMSK2’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: ‘PCMSK0’ was not declared in this scope
C:\arduino-1.0.5-r2\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: ‘PCMSK1’ was not declared in this scope

Which Arduino board are you using, and which Arduino board is selected in the menu ?

I have selected Arduino NG or older w/Atmega8. I am using freduino usb1.0 board

The Freeduino with usb is like the Arduino Uno ? And you have the ATmega8 chip, instead of the ATmega328p ? So it is like these boards : http://www.rajguruelectronics.com/freeduino-board.html http://www.bhashatech.com/22-freeduino-usb.html

650 * 0.016372 = 10 dollars. I can find Arduino Uno ATmega328p and Leonardo clones on Ebay for 9 dollars (inclusive shipping).

I'm sorry, but SoftwareSerial does not work on a ATmega8. http://forum.arduino.cc/index.php/topic,168934.0.html

The ATmega8 is/was one of the official supported chips, but it is old. A number of libraries do no longer work with it. Perhaps there is a software serial library that does support the ATmega8, but I could not find it.

Can you get an Arduino board with the ATmega328p ? or a Leonardo board ? What do you need the serial communication for ?

I want to interface my RF ID reader reader to Arduino board and at a time in serial monitor. so i need to serial pins. Is there any option to use same pin for the both purposes, but i don't want buy any new one..............?

Thanks for your kind co-operation. I am poor in English. Any wrongs forgive me and try to understand my problem

Yes the board like Arduino uno with ATmega8

It is possible to split the UART into two parts.

Use RX to read the RFID, the signal should override the signal from the computer.
Use TX to write to the serial monitor on the computer(as it is).
If you set the serial port to 2400 for the RFID, als the serial monitor on the computer should be set to 2400 baud.
To upload a sketch, you have to remove the wire from the RFID to the RX pin.

I think that is what is done in the first example here: http://playground.arduino.cc/Learning/PRFID

There is software serial code available for the ATmega8. But I don’t know how reliable they are.
Atmel has a document: “AVR304: Half Duplex Interrupt Driven Software UART”
Someone has made changes to make it work for the ATmega8: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=86097

Can anybody, please provide bootloader for atmega328 with 16MHz

All the bootloaders are in the Arduino IDE. You select the programmer you have, and select 'burn bootloader' from the menu.