losturcos
Member level 4
hi!
i am making a serial connection rs485 between pic18f452 and pic16f628.
The procedure is one send byte message the other get it and replies as an ok msg. This happens three times. Then the receiver becomes the sender and the same procedure occurs.
Now, the program works if i connect RX and TX pins directly. But when i use sn75176, one for each pic, it doesn't work. I set the DeRe pin high before the message sending and clear it after sending, this is the nearly only difference at the code. No data transmission. If i put a big delay(150ms) after sending msg, two or three transmissions seems to happen. Then it is locked again. What can the problem be? Do you have a guess. I will send the codes when i prepare them for sending.
Thanks.
Note: I use no interrupts.
i am making a serial connection rs485 between pic18f452 and pic16f628.
The procedure is one send byte message the other get it and replies as an ok msg. This happens three times. Then the receiver becomes the sender and the same procedure occurs.
Now, the program works if i connect RX and TX pins directly. But when i use sn75176, one for each pic, it doesn't work. I set the DeRe pin high before the message sending and clear it after sending, this is the nearly only difference at the code. No data transmission. If i put a big delay(150ms) after sending msg, two or three transmissions seems to happen. Then it is locked again. What can the problem be? Do you have a guess. I will send the codes when i prepare them for sending.
Thanks.
Note: I use no interrupts.