Hi,
You said that the problem occured when the frame was large and I was asking HOW large.

The reason I asked is that your buffer wraps around when Length is 20 you only have space for 21 characters in your buffer.

You get you characters from RCREG and put them in Buffer[0], Buffer[1], Buffer[2].......Buffer[20]. When Length reaches 20 it wraps around to 0 and you overwrite what's in Buffer[0] and because you said the problem occured when the frame was "very large". So, is it when the frame is larger than 20 bytes?

/Henrik.