-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Not working with I2C communication #75
Comments
Hi, thank you for the issue. Both I2C and Modbus are buses that solve the problem of master/slaves communication, so when using the same line you will have two masters, one for I2C and one for Modbus, My guess guess is that they want to talk/recive the same time and interfere. |
@yaacov yes that's what I observe, that both are trying to communicate and hence there is conflict. Is there any way to implement both things? I am trying external interrupt right now. So I have connected the INT1 (pin 3) of arduino to RX of arduino. RX pin is connected to TTL to RS485 converter pin. So when arduino receive the request from a modbus master then interrupt should trigger and sensor (which is on I2C) data should poll. But what I observe is that the RX pin is always on. Any idea on this method? |
I don't think so, even if you can shut down one server, it's clients will continue to interfere with the other bus communication |
@yaacov Do you have any other idea that I can try and implement? |
use a virtual serial library for the Modbus's line if you can afford one set of additional wires. (e.g. AltSoftSerial) |
I am already using AltSoftSerial for debugging and programming purpose. Programming of slave id, baud rate and other parameters. But can interchange Serial and AtlSoftSerial purpose. Will try that. |
@falahati It's not working with AltSoftSerial as well. I am stuck now with no ideas! |
I have used a working solution Arduino Nano Modbus TX (0), 1 / RX (1), and
the I2C bus A4 (13) of the SDA, A5, (14), SCL
ti 2. maalisk. 2021 klo 9.14 Akshul Goyal ([email protected])
kirjoitti:
… @falahati <https://github.com/falahati> It's not working with
AltSoftSerial as well. I am stuck now with no ideas!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJBO6U73S3X5F7FEAPNEKZDTBSF5XANCNFSM4YL7PSWQ>
.
|
@Apulanta That's the same configuration I am using with Arduino UNO. But it's not working. |
I had successfully implemented this library with Arduino as an I2c slave. So one arduino modbus slave + I2c slave works. But right now I have interfaced a I2C sensor with arduino, and modbus is not working, not able to scan registry on a modbus master end. Arduino modbus slave + I2C master won't work. I have tried with some flags but still not working. Any ideas on what might be the issue?
The text was updated successfully, but these errors were encountered: