串口设置
USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = [img]USART_Mode_Rx| USART_Mode_Tx;
USART_Init(USART1, &USART_InitStructure);
输出设置
USART1_printf(USART1, "1");
USART1_printf(USART1, "1");
USART1_printf(USART1, "1");
图中一个周期得到数据为:10111001100
转换为TTL为:01000110011
数据信息为:1000 1100 (Hex 31)
为甚后面还多了一个 0呢?
此帖出自
小平头技术问答
去看你所用芯片的器件手册。
恕我愚笨,能点明 应该在手册中查哪些参量的设置呢
一周热门 更多>