QG8 SCI Rx problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

QG8 SCI Rx problem

跳至解决方案
1,034 次查看
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
标签 (1)
0 项奖励
回复
1 解答
825 次查看
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 项奖励
回复
2 回复数
825 次查看
abicash
Contributor III

Hello

 

I was not storing the trim values.

 

Problem solved

 

Thanks

0 项奖励
回复
826 次查看
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 项奖励
回复