Wrong data aquired from AS1_RecvChar(&var);  Serial Communication

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

Wrong data aquired from AS1_RecvChar(&var);  Serial Communication

跳至解决方案
1,947 次查看
ArturoJsx
Contributor I

The value in serial data receiver register SCI1D is not getting the right value for *Chr variable of AS1_RcvChar() function, created by Processor Expert. I´m receiving "!" 0xa1 while I´m expecting to receive a 'A' 0x41 . 

 

Whatever value I try it gives me another.  for example if i send from my pc 0x01   i´m getting 0x81 in  AS1_RecvChar(&var) or SCI1D directly.

 

I try both MCF51QE128 and MC9S08QE128. I set my internal clock to 36Khz & internal bus to 9.216 so i could get a exact 115200 Baudrate for my serial com

标签 (1)
0 项奖励
回复
1 解答
1,180 次查看
ProcessorExpert
Senior Contributor III

 

Hello,

I think that it is not issue related to Processor Expert tool, it is rather timing issue. Please note that if non-default internal clock is needed, it’s necessary to set it in P&E connection dialog. Could you please doublecheck that your internal clock source is properly trimmed to 36 kHz? For more details please find attached screen-shot.

best regards
Vojtech Filip
Processor Expert Support Team

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,181 次查看
ProcessorExpert
Senior Contributor III

 

Hello,

I think that it is not issue related to Processor Expert tool, it is rather timing issue. Please note that if non-default internal clock is needed, it’s necessary to set it in P&E connection dialog. Could you please doublecheck that your internal clock source is properly trimmed to 36 kHz? For more details please find attached screen-shot.

best regards
Vojtech Filip
Processor Expert Support Team

0 项奖励
回复
1,180 次查看
ArturoJsx
Contributor I

Hello again

 

It works, as you said I didn´t notice I had to set the trim value on PE Dialog so once i did it I start to receive the right values. Thank you for your assistance !!

0 项奖励
回复