problem with rs485 transmission

Status
Not open for further replies.

tejashs

Member level 1
Joined
Sep 4, 2011
Messages
38
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,513
hello,

i am trying to interface an RS485 chip to my 8051 controller, this is the tesing circuit i have made

i have problem communicating between 8051 and pc through
this is my schematic

J1 and J2 jumpers are connected only when programming
the cable length between max 485s is mot even 10cm
the program i have used for testing is this
Code:
#include <reg52.h>

sbit RE_DE = P3^6;

void main()
{
	unsigned char i = 0;
	unsigned int j;
	TMOD = 0x20;
	TH1 = -6;
	SCON = 0x50;
	TR1 = 1;
	RE_DE = 1;

	while(1)
	{
		SBUF = 'U';
		while(!TI);
		for(j=0;j<5000;j++);
	}  
}
the 8051 transmits 'U' continuously but i am not recieving it on my PC terminal
i do not understand what the problem is or how to rectify it
 
Last edited:

don't forget to connect PIN 5 (GND) from the DB9 serial connector to GND of your circuit...


have you tested it without both max485??? did it work????
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…