Go Down

Topic: Mysterious RS485 problem (Read 3 times) previous topic - next topic

Virginia

Hi everyone,
I have some short of "mysterious" problem as well with the RS485. In fact I have connected and LCD, a keyboard and a MAX485 to the chip. I have developed a menu  that shows in the LCD and I can navigate through it using the keypad. I have also a sensor transmittting i n RS485 connected to the MAX485 that is connected to my serial port. Problems is:
-Only reception of data from sensor and display it in the LCD works fine
-Only navugation through the mmenu works fine (transmission disabled)
- If I navigate while receiving, it works fine for a while, but suddenly the menus get stuck and reception stops. No more information is received (I have tested sensor is still sensing).
Any idea why this can be happening?
(I also checked problem of overflow in buffer, but there is not such a problem)
Thanks!

mertgulsoy


Hi everyone,
I have some short of "mysterious" problem as well with the RS485. In fact I have connected and LCD, a keyboard and a MAX485 to the chip. I have developed a menu  that shows in the LCD and I can navigate through it using the keypad. I have also a sensor transmittting i n RS485 connected to the MAX485 that is connected to my serial port. Problems is:
-Only reception of data from sensor and display it in the LCD works fine
-Only navugation through the mmenu works fine (transmission disabled)
- If I navigate while receiving, it works fine for a while, but suddenly the menus get stuck and reception stops. No more information is received (I have tested sensor is still sensing).
Any idea why this can be happening?
(I also checked problem of overflow in buffer, but there is not such a problem)
Thanks!


Using the 485 line in half duplex mode is not a good idea as i learned. But with your project for the RS485 line only the sensor is connected? Or all lcd, keypad and stuff are on a RS485 bus?

Virginia

Only sensor is connected, keypad and LCD are directly connected to the micro

mertgulsoy

For the resolution of my problem i made these things and the system is now working:

- I rechecked the needs for transmission from the slaves to master. If there is not a diagnosis by hand on going, the slave devices are not sending any messages to the master.
- For the receiving, (i dont know why but) i kept the
Code: [Select]
Serial.println lines, as the DE pin not enabled. by doing this the system works as expected. I think if i remove the Serial.println lines and add delay(10) for example the system is going to work because of the flow of my code.
- For further projects, if i will need to send data in all directions i'll implement 2 max485 chips for each side, one is for sending and other for receiving.

Thank you very much for your answers.

Mert

Virginia

Thnak you for the answer...but I tried and is still not working. It receives data for a while, while I am navigating through the menu is still receiving, but after some time the program stops, nothing works still

Go Up