Change UART Properties
Posted: Tue Oct 11, 2022 12:35 pm
Hello!
I am using the MODBUS Slave component, the PIC chip is 18F26K42 running @16Mhz, everything is working good for the moment when communicating with MODSCAN32 or RADZIO on computer, but i am facing problem while communicating with some other hardware or other computer software which is demanding Parity and Stop Bit settings.
After reading the datasheet of the same chip (page 499 to 501, datasheet not able to attach due to size), i found few settings for UART Control Registers, in these settings i noticed it was possible to set the Parity as well the Stop bit for the UART (if i am not wrong the Modbus slave is working on RS232 bus), may i know if it is possible to change the settings of this registers accordingly after Initializing the Modbus Slave and before the beginning of the Loop in the Main, is the change valid and acceptable if written in C block, if yes may i request someone to help me how it is done.
Thank you.
Abhi
I am using the MODBUS Slave component, the PIC chip is 18F26K42 running @16Mhz, everything is working good for the moment when communicating with MODSCAN32 or RADZIO on computer, but i am facing problem while communicating with some other hardware or other computer software which is demanding Parity and Stop Bit settings.
After reading the datasheet of the same chip (page 499 to 501, datasheet not able to attach due to size), i found few settings for UART Control Registers, in these settings i noticed it was possible to set the Parity as well the Stop bit for the UART (if i am not wrong the Modbus slave is working on RS232 bus), may i know if it is possible to change the settings of this registers accordingly after Initializing the Modbus Slave and before the beginning of the Loop in the Main, is the change valid and acceptable if written in C block, if yes may i request someone to help me how it is done.
Thank you.
Abhi