QG8 SCI Rx problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QG8 SCI Rx problem

Jump to solution
516 Views
abicash
Contributor III

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
Labels (1)
0 Kudos
1 Solution
307 Views
peg
Senior Contributor IV

Hello abicash,

 

Are you using the internal oscillator?

Have you trimmed it?

And loaded the value into the non volatile trim locations?

Have you copied the NV values over to the volatile registers at power up?

 

I'm guessing your problems due to baudrate mismatch.

Did not even look at your code.

View solution in original post

0 Kudos
2 Replies
307 Views
abicash
Contributor III

Hello

 

I was not storing the trim values.

 

Problem solved

 

Thanks

0 Kudos
308 Views
peg
Senior Contributor IV

Hello abicash,

 

Are you using the internal oscillator?

Have you trimmed it?

And loaded the value into the non volatile trim locations?

Have you copied the NV values over to the volatile registers at power up?

 

I'm guessing your problems due to baudrate mismatch.

Did not even look at your code.

0 Kudos