uart rts引脚 如果用来控制rs485怎么配置

2019-07-21 01:07发布

usrt 的RTS引脚想用来控制485的RE/DE控制脚,是不是只要 USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_RTS;这么设置,程序是不是就可以自动控制了,不需要程序再写RE/DE使能程序[/mw_shl_code] [/mw_shl_code] USART_InitStructure.USART_BaudRate = 9600;[/mw_shl_code] 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_RTS;[/mw_shl_code] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_Init(USART3, &USART_InitStructure);[/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。