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

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

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

Jump to solution
1,229 Views
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

Labels (1)
0 Kudos
1 Solution
462 Views
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

View solution in original post

0 Kudos
2 Replies
463 Views
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 Kudos
462 Views
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 Kudos