Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with RS485 driver

Status
Not open for further replies.

freedomtruth

Junior Member level 2
Junior Member level 2
Joined
Sep 4, 2006
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,455
I have a problem with rs485 driver SN65176b (which is exactly like max485).
I wrote a code for a pic to send modbus commands to a temperature controller but got no responses.
Here is how the command is being sent.
Code:
output_high(drive_enable);
printf ( ":010310000001BE\r\n" );
output_low(drive_enable);
Then accidentally the wire on “Drive Enable” pin disconnected (left floating) and the slave responded! I’m very confused.
Isn’t the output driver supposed to be disabled when left open?
If the output driver is active, then how can the chip receive messages?
Why my code which controls the direction doesn’t work?

(devices are 10cm apart. power is 5v. no termination resistors. no fail-safe biasing resistors)

Sharing your experiences would be appreciated
 

When the drive enable floats, there's no guarantee which state it will assume.

Maybe you should disconnect your controller, and look at your 65176 with a scope. Maybe the controller is not disconnecting its driver when you think it should. Maybe your software is inverting the driver enable, who knows? It's pretty hard to debug hardware without some kind of instrumentation.
 
Thank you
I have "Drive Enable(Active High)" and "Receive Enable(Active Low)" connected to each other and control it with one pin. I checked it and it's correct.

My main question is: If the output driver and receive driver are both active, then how does the chip receive messages (which does)?!
 

Thank you
I have "Drive Enable(Active High)" and "Receive Enable(Active Low)" connected to each other and control it with one pin. I checked it and it's correct.

My main question is: If the output driver and receive driver are both active, then how does the chip receive messages (which does)?!

They can't be active at the same time, connect them together and select only one mode of operation ...
:wink:
IanP
 
I did a test: Tied the DE to Vcc and 'RE to GND But I still receive messages. how is this possible?
 

Yes, I understand the echo. I mean I receive messages from the slave! i.e. Master and slave are driving the line simultaneously!
 

connect both the reciever enable (RE) and driver enable (DE) together to a microcontroller pin and operate it like....high for transmission and low for reception....plz inform here if still any problem arise due to this
 

There is a further problem which is more likely to be the cause of the problem.
The RE and DE pins can be tied together, one is active high and the other active low but they can't be controlled in the method used in the program. I'm guessing the problem is that the end of the printf message is not being transmitted becasue the last character(s) are still in the UART buffer when the transmit is disabled. The 'dirty' fix would be to add a delay after the printf statement, a better solution is to check if the UART transmit buffer is empty before moving on.

Brian.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top