Just a thought, if you have accidently crossed the rs485 wires, then the signal will be inverted at the receiving end, so your serial data would be inverted.
Just a thought, if you have accidently crossed the rs485 wires, then the signal will be inverted at the receiving end, so your serial data would be inverted.
With fragment of code and no schematic, I personally think you cannot get much more help. Please post the whole code you are using, along with some reference to the data sheet of the slaves you have installed in your network. Naturaly complete the info with a schematic on the setup.
With a more complete picture you will have a better chance to get the corrected advice.
Cheers
Al.
All progress began with an idea
Hello aratti,
The network is only one master, the pic controller, on there i use serout2 and a 7segment display as slave, that use a Atmega88P. Both with baud 2400
The display works fine on other project as slave too on baud 38400, all with Atmega controllers. The display is not a problem, the protocol is the same,
only on this project with the pic i have change the baud to 2400. With software uart it not possible to work on baud 38400. Why i have change the baud on the
display to 2400.
I can draw a schematic tomorrow, but like i said the display is working on the other project. On the board with the pic i have connect PORTE.0 to pin 4 and PORTE.2 to pin 1
of the max487. The pin 2 and 3 of the max487 connect together to PORTE.1. On startup make the PORTE.1 as output and high for transmit mode. A is connected to A and B to B of the max487 on the display.
Best regards
visitac
Bookmarks