PPS配置:大家好,在我的main.c的开头,我有一个被配置为Uart TX的数字引脚,如下所示:PPSOutput(PPS_U2TX,PPS_RP16);//TX UART2 RF3 OUT_PIN_PPS_RP16=OUT_FN_PPS_U4TX;如果在程序中的某个点上,我想把它作为数字输出来管理,那么我应该做:PPSOutput(PPS_NULL):PPS_RP16);//TX UART2 RF3 OUT_PIN_PPS_RP16=OUT_FN_PPS_NULL(RPOR8bit.RP16R=NULL)但是它似乎不能正常工作,因为设置TRIS和LATCH寄存器我看不到数字输出引脚的变化。你有什么想法吗?萨尔瓦多
以上来自于百度翻译
以下为原文
PPS Configura
tion: Hi all, I have a digital pin configurated as Uart TX at the beginning of my main .c as follow: PPSOutput(PPS_U2TX,PPS_RP16); //TX UART2 RF3 OUT_PIN_PPS_RP16=OUT_FN_PPS_U4TX; if at a certain point in my program I want to manage it as a digital output I should do: PPSOutput(PPS_NULL,PPS_RP16); //TX UART2 RF3 OUT_PIN_PPS_RP16=OUT_FN_PPS_NULL (RPOR8bits.RP16R=NULL)
but it seems to not work properly, becouse setting TRIS and LATCH register I can not see variation on Digital output pin.
Have you some ideas? Tnk you
Best regards
Salvatore