-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control Pin problem (remained to HIGH after several time of communication) #72
Comments
@panther50500 Thank you for open this issue. I'm using the same @brainelectronics maybe here we have a patch to improve the code for the RS485?
|
Hey @panther50500 could you retest the reported issue with 2.3.5, it should have been fixed by #75 |
Hello. I'm sorry I couldn't rewire and test before today. On the raspberry pico, I made a modification line 280 to add "time.sleep_us(self._t1char)" otherwise I have errors and on the scope, the data is covered by the rts signal :
For the moment, I have tested at 19200 & 115200 with and whithout "if self._has_uart_flush" condition and until now, I have no errors. |
Hi again @panther50500 could you retest the reported issue with 2.3.7, it should have been fixed by #79, I've added you proposed wait time after the flush. |
Hi, I tested the 2.3.7 revision during few days and with different baudrates (9600, 19200, 115200 and 500000) also with and without the has_uart_flush condition. It seems to be good for the driving of the RTS signal like that. Thanks |
Description
Hello,
I use it with a Raspberry PICO with modbus rtu protocol and RTS control PIN activated to manage a MAX485 device.
So, I had to modify few lines in the serial.py file because after a few time of communication, the control PIN remained to HIGH and blocked the MAX485 in transmit mode. I think the problem arrives when an overflow of time.ticks_us() occurs.
Here my modifications :
line 110 ( to inialise RTS pin to 0 at reboot, in case of freeze or execution program stopped when control PIN activated, else it stayed to HIGH and block reception) :
line 260 (use time.ticks_diff() ) :
Reproduction steps
...
MicroPython version
v1.9.1
MicroPython board
Raspberry Pico
MicroPython Modbus version
Relevant log output
User code
Additional informations
No response
The text was updated successfully, but these errors were encountered: