In that case I suspect the problem is that you have not selected the correct serial port or port settings for the serial monitor. The settings in the monitor window need to be the same settings that your sketch uses to initialise the serial port on the Arduino. If you can't see the problem there then I suggest you post your code (in its entirety, using [ code ] [ /code ] tags) and also say what port settings you are using in the serial monitor.

I only provide help via the forum - please do not contact me for private consultancy.

this program has worked for me for both in MAC and windows run Individually. when tried to download MAC program in to arduino through windows xp IDE they are not working.i wanna know what make not to run program. since they are simple c program. If i copy the MAC os IDE program ( Ex: BLINK program ) and paste it on Windows xp IDE of arduino, and upload it then it working

where as pin 8 an 9 i m connecting usb to TTl monitor . IN serial monitor i am selecting port refer to USB to ttl .

in below code i am reading data from Serial.port 0 and 1 and writing in to user defined hardware Serial port 8 and 9.

While that's all possible, it's not what I would call simple. You started off describing what sounded like a fundamental problem, and I still don't know whether you're chasing a fundamental problem in the way you build and upload your sketch, or in the operation of the serial port, or a more complex problem in the way your sketch interacts with the various bits of hardware you're now introducing.

Please start with the basics: disconnecting all the extra hardware, if you upload a sketch that simply initialises and writes to the hardware Serial port, does this work correctly?

I only provide help via the forum - please do not contact me for private consultancy.