This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28027: 数据范围以及数值转换

Part Number: TMS320F28027


1.定义变量uint8_t Data_cnt=0;

2.变量在while循环里面一直做递增加法

while(1)

{

printf("\r\nData_cnt=%d ",Data_cnt);
++Data_cnt;

}

发现串口助手上面Data_cnt;有超过255数据打印出来  这是怎么回事?

串口助手部分数据如下

Data_cnt=399
Data_cnt=400
Data_cnt=401

3.当定义变量uint32_t Data_tmp=369;uint8_t m=0;

在程序中这样操作后

m=Data_tmp;

printf("\r\nm=%d ",m);

串口助手打印还是369  C语言默认数值转换规则好像在CCS上没有实现  这是怎么回事?

谢谢!