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.

confused with 8051 seraial communication...plz help...

Status
Not open for further replies.

slayer234

Newbie level 6
Joined
Mar 10, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,369
does the receiver uc at the receiveing end start receiveing only after the reset switch at the transmitter end is pressed......because we r receiving it properly until the reset at the transmitter is pressed....plzz help...its urgent :cry:
 

Are you interfacing two uc for serial communication? As i know 8051 supports RS232 serial communication protocol and if reset switch is pressed it will terminate the communication.
 

yes we have 2 ucs -one having a transmitter and one with a receiver at the other end....and we are using txd and rxd pins for transmitting and receiving...
 

but the problem is not with the reset...but the data is not being received p[roperly unless and until the rest at the transmitter is pressed...viz the data will not be received until the reset is pressed
plzz help...
 

of course the uC needs to be reset for sending a fresh data
 

im talking abt the reset at uc at which transmittr is connectd....the problem is dat the transmitted data at the txd pin does not get received at the rxd pin unless and until the RESET AT THE TRANSMITTER IS PRESSED...THE TRANSMITTED SEQ IS ASYNC ISNT IT...so that means that data shd get received on the rxd pin as soon the receiver comes in the range of the transmitter?????plzz help
 

im talking abt the reset at uc at which transmittr is connectd....the problem is dat the transmitted data at the txd pin does not get received at the rxd pin unless and until the RESET AT THE TRANSMITTER IS PRESSED...THE TRANSMITTED SEQ IS ASYNC ISNT IT...so that means that data shd get received on the rxd pin as soon the receiver comes in the range of the transmitter?????plzz help

It looks like the transmitter sends data string only one time, and to force it to send it again you have to press reset, ie. start executing program from the beginning.
Have a look at the transmitter’s software and try to modify it in such a way that it sends data in a loop (again and again), say, every second, or so ..

:wink:
IanP
 

It looks like the transmitter sends data string only one time, and to force it to send it again you have to press reset, ie. start executing program from the beginning.
Have a look at the transmitter’s software and try to modify it in such a way that it sends data in a loop (again and again), say, every second, or so ..

:wink:
IanP


PERFECT MAN , thats the actual problem
 

$mod51

org 00h

sjmp main

org 040h
main:

START:
mov TMOD, #20H ;T1 is mode2
mov TH1, #-3 ;9600 baud
mov SCON, #50H ;8b, 1stop, 1start, REN enabled
setb TR1 ;start timer T1

AGAIN:
clr TI ;ready to transmit
mov SBUF, #00000001b ;letter "S" is to be transmitted


HERE:
jnb TI, HERE ;poll TI until all the bits are transmitted
sjmp AGAIN ;while(1) loop (forever loop)

end



this is our transmitter program...its sending it in a loop...just as you said...ie its sending a string of 000000010000000100000001....continously...but still i need a reset to get it to work...plzz help :-(
 

@slayer234 : dont post source codes without code tags

the code seems alright but still,

try the following program:

Code:
org 00h
	mov TMOD,#20h
	mov TH1,#-3
	mov SCON,#50h

		
	setb tr1

	 mov dptr,#msg
line:
clr a
movc a,@a+dptr
jz final2
lcall tran
sjmp line

final2:	



	   sjmp $



tran:
mov SBUF,a

		JNB TI,$
	 	CLR TI
	 	inc dptr
		ret

org 23h
msg:
db "message",0


	
end
 

another rpoblem that i encountered is that the taransmitted output when checked with a digital signal oscilloscope ggives very less output ie 500mv...this means that we are also getting even lesser output at the receiver ie 106mv...i cant figure out why is that so???again,when we try to connect a lead between tcd and rxd pin then we are receiveing properly...cud any one tell me where the problem lies???plzz help

---------- Post added at 15:02 ---------- Previous post was at 14:53 ----------

is it possible to connect a driver to the transmitter to increase its voltage
??
 

Use P3.0 and P3.1 as a INT 0 and Int 1 (falling edge triggered interrupt) by modifying SCON Reg.
so the controller will get interrupted whenever it gets falling edge signal and you can use them by programming as per your need.
Refer Mazidi book to know how to use edge triggered interrupt.
I've not tried it, but I am sure it will work, just give it a try...
 

does the txd pin always send out high pulses at 5 v
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top