问题描述:
编写单片机C程序时,经常会用到printf输出信息进行查看,如何查看printf输出?
问题解决:
(1)编写单片机C程序
ucos是一个实时多任务操作系统,以上是一个优先级为3的任务
注:
以上为任务二,为一个按钮触发任务
(2)Win7使用超级终端查看单片机输出
说明:
由于Win7没有超级终端,我们这里使用securecrt
(3)打开securecrt,选择串口
注:
选择快速连接
注:
选择串口连接
注:
根据单片机通信串口配置串口信息,这里是COM3
注:
运行单片机程序之后,可以查看到单片机程序的printf输出。