打印

RX8 串行接收器接收不到数据?

[复制链接]
394|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zj.ok|  楼主 | 2017-4-13 11:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式


#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules
#include "RX8.h"


BOOL fWaitToReceiveByte(void)
{
    BYTE bRxStatus;

    /* Wait to receive full byte*/
    while ( !( bRxStatus=RX8_bReadRxStatus() & RX8_RX_COMPLETE ) )
    {
        /* might want to sleep or keep track of time */
    }

    /* data received, now check for errors */
    if (( bRxStatus & RX8_RX_NO_ERROR ) == 0 )
    {
        /* no error detected */
        bRxData = RX8_bReadRxData();
        return( TRUE );
    }
    else
    {
        /* error detected */
        bRxData = bRxStatus;
        return( FALSE );
    }
}

void main(void)
{

RX8 问题.pdf

134.05 KB

RX8配置

沙发
zj.ok|  楼主 | 2017-4-13 17:44 | 只看该作者
补充一下,数据可以接受到,但是数据不对,是波特率问题吗?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

2

帖子

0

粉丝