Problem with use two serial port an a same tiem

hi, at the first time, I am sorry for my bad english.

I am working in a RFID reader , with use two sensors RFID in the port C and D.
I try with one port first, and all work correctly, but when i agree other port, the system not read good for any port. I don�t now ho is the problem, if can you help me.

thanks very much!!!
this is the segment of code the my program.

void main()
{
int i,j;
unsigned char RFID1[15];
unsigned char RFID2[15];

costate
{
wfd i=cof_serDread(RFID1,14,100);


 		}

costate
{
wfd j=cof_serCread(RFID2,14,100);



}

}

Aside from not seeing initialization for the ports your code looks pretty good at first blush. You may need to declare your arrays as “static” to overcome some unknown compiler funny. I use 3 serial ports concurrently with no issues:

void main()
{
serBopen(9600);
serCopen(9600);
serDopen(9600);

serBrdFlush(); //
serCrdFlush(); //
serDrdFlush(); //

serBwrFlush(); //
serCwrFlush(); //
serDwrFlush(); //

// costates & such …

}