51单片机printf打印输出到串口说明以及使用注意事项
-
先来看看kEIL官方帮助文档的说明:文件位置:
C:\Keil_v5\C51\Hlp\c51tools.chm
,具体路径看个人安装位置。(如果不想看前面讲的一大堆,可以直接跳到最后看代码示例,你会明白使用prinf打印输出不同数据类型的数据的使用方法。)
-
先来看看
scanf517
函数j介绍
`Each field in the format specification can be a single character or a number which specifies a particular format option.
The type field is where a single character specifies whether input characters are interpreted as a character, string, or number. This field can be any one of the characters in the following table.
`
- 译文:
格式规范中的每个字段可以是单个字符或指定特定格式选项的数字。
在类型字段中,单个字符指定输入字符是解释为字符、字符串还是数字。该字段可以是下表中的任意一个字符。