Delay in displaying data received from UART when used with PCINT on PIN0 I have been trying to find a solution for UART receive interrupt for my UNO board and I came across a possible solution in : PCInt

I did a small editing in the following portion of the code to make it work for UART.(code works like a loop-back test)

void RXint(void) {
char k;
if(Serial.available()&gt;0)
{
k=Serial.read();
Serial.print(k);
}}
void setup()
{
Serial.begin(9600);
PCattachInterrupt(0, RXint, FALLING);
}
void loop() 
{}


The code works pretty well with one big drawback. 
The character displayed is having one char delay, what i mean is that for the following input


  qwerty


output is


  qwert


That means if I enter the 5th char,the output will be 4th one.
When the first input is given, it doesn't show output till the second input is entered.

Can someone help me out with this

(This is only a test code, the interrupt part is to be used in a larger code where the loop() carries out different tasks and interrupt is to be raised when data is received via UART)  .
Your interrupt is happening at the same time the START bit of the next frame is arriving in the hardware. As a result you don't have that data yet, because it's still to arrive. All you have is what has gone before. You won't get the new character until the frame has finished arriving and the UART RX interrupt fires and the byte gets copied out of the RX FIFO and placed into the Arduino receive buffer. 

The way you are doing it is completely wrong. The data is already being captured using an interrupt and placed in a buffer for you to deal with as you see fit at a time that suits you (as long as it is before the buffer overflows).

If you can't read it fast enough using your main loop (or variations thereon) then you need to rethink how you are doing your main loop.