智能车制作

标题: CW V7.2 PE生成无线串口程序不成功,求大神! [打印本页]

作者: 491965376    时间: 2012-5-22 14:25
标题: CW V7.2 PE生成无线串口程序不成功,求大神!
程序如下:
void main(void)
{
  /* Write your local variable definition here */
  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/
for(;;)
{
AS1_SendChar('H');
AS1_SendChar('E');
AS1_SendChar('L');
AS1_SendChar('L');
AS1_SendChar('O');
}
  /* Write your code here */
  /* For example: for(;;) { } */
  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/
  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/
  for(;;){}
  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/
} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

串口AS1是由PE自动生成的,但是发送出来的数据就是乱码如下:
00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 E0 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0 00 00 E0
波特率什么的都是正确的,有没有相同问题的,急用呀,搞了几天了,做不下去了!


作者: xinmengwangran    时间: 2012-5-23 22:02
这么高的版本啊!
作者: glan    时间: 2012-9-8 11:54
可能因为波特率太高了,试试19200




欢迎光临 智能车制作 (http://111.231.132.190/) Powered by Discuz! X3.2