AnsweredAssumed Answered

QG8 SCI Rx problem

Question asked by Abhijit Jagtap on Jun 6, 2011
Latest reply on Jun 6, 2011 by Abhijit Jagtap

Hi

 

I have a Rx Tx pair on QG8.

The Tx sends the status of 5 switches on RF (through SCI) to the receiver board.

 

Now the issue i am facing is that whenever i connect receiver through the USB multilink cable and run the program,correct keys are detected.

Key 1 = 00001

Key 2 = 00010

Key 3 = 00100

Key 4 = 01000

Key 5 = 10000

 

But whenever i run the boards in standalone mode i get errors.

I monitor the receiver side on hyperterminal and see that the transmitter is sending correct data.But the receiver algorithm

decodes Key 5 =100000 (6 bits) and key 4 = 10000 (5 bits) key 3 = 01100

only 1st two keys are decoded correctly.

 

the code for receiver is

 

while(1)  {        for(i=0;i<100;i++);          while (!SCIS1_RDRF);   // wait for a new character to be received      for(i=0;i<100;i++);         rxchar = SCID;         // read the received char                 if ((rxchar & 0x01)==0x01) {      LED1 = ON;    }else if ((rxchar & 0x01)==0) LED1 = OFF;//////code for other decodes////  

What could be the problem? .My baud is 9600

Thanks and regards

Outcomes