fuzzzy
Full Member level 3
pic rs485
Hi,
I'm trying to connect 2 PIC16f876 by rs485 using SN75176 transceiver. I'd like to use half duplex configuration, so i control RE and DE pins togheter by Port C5 thata is always 0(receiving). It will be set 1 before transimitting and then it returns to 0.
I use pins C6 and C7 to receive and transmit data.
I've some problems in comunication.After a lot of attempt i realized that When one PIC transimts data it seems as it receives what it has transmitted and this will fill in receiving buffer. so the transimitting pic receives the same data it sends. and when the other pic tryes to send data the first pic can't decode data.
I tried all configuration suggested in datasheet to remove bias, with 120 ohm resistors and so on but it's the same. so i should exclude problems on the line.
What will you suggest to try? how can i solve this problem?
thanks!
P.s. I program my PIC using CCS C
Hi,
I'm trying to connect 2 PIC16f876 by rs485 using SN75176 transceiver. I'd like to use half duplex configuration, so i control RE and DE pins togheter by Port C5 thata is always 0(receiving). It will be set 1 before transimitting and then it returns to 0.
I use pins C6 and C7 to receive and transmit data.
I've some problems in comunication.After a lot of attempt i realized that When one PIC transimts data it seems as it receives what it has transmitted and this will fill in receiving buffer. so the transimitting pic receives the same data it sends. and when the other pic tryes to send data the first pic can't decode data.
I tried all configuration suggested in datasheet to remove bias, with 120 ohm resistors and so on but it's the same. so i should exclude problems on the line.
What will you suggest to try? how can i solve this problem?
thanks!
P.s. I program my PIC using CCS C