Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/09/10 03:10
Modified:
  09/09/10 03:25

Read: times


 
#178482 - strange behaviour in serial communication
hi I have interfaced P89V51 with my pc using max233. I start the hyperterminal on pc and when i power up the microcontroller circuit , it sends the string correctly but when i power off the circuit it still sends 3 exact copies of the original string .
So if i run the code below it will send ">>>>>>>>>>>>>>TESTING SERIAL IO <<<<<<<<<<<<<<<<< "
to the hyperterminal, and when i turn the power off on the controller , i see three more times
">>>>>>>>>>>>>>TESTING SERIAL IO <<<<<<<<<<<<<<<<<"
">>>>>>>>>>>>>>TESTING SERIAL IO <<<<<<<<<<<<<<<<<"
">>>>>>>>>>>>>>TESTING SERIAL IO <<<<<<<<<<<<<<<<<"
on the hyperterminal.
why is the circuit sending three more copies of the same data ?
I have attached the RS232 circuit and the micro controller setup .

Thanks
Sami

the assembly code is below

$MOD51
;
; The processor clock speed is 11.059MHz
; Cycle time is 1.1ms

	cr	equ  	0Dh
	lf	equ	0Ah
		   
	org	00
	ljmp	main

        org 100h
main:	mov	scon,#40H 		;mode 1, recv enable
	mov 	tmod,#20H		;timer 1 in auto reload
	mov 	th1,#00FDH		;9600 baud at 11.059MHz
	setb	tr1	 		;start timer 1
	mov	R1,#1			;initialize counter
	clr 	ti			;clear for Xmitting
loop:	mov	dptr,#msg		;pointer to the msg
	lcall 	send			;send the msg 1 times 	
	djnz	R1,loop		
	jmp	$			;wait forever

send:	mov	a,#0
	movc	a,@a+dptr		;char from msg string
	cjne	a,#99h,cont		;is msg sent ? if not continue
	ret
cont:	mov	sbuf,a			;send the char
	jnb	ti,$			;wait for xmitter ready
	clr	ti			;enable xmitter
	inc	dptr			;point to next byte
	jmp	send			;go send it

msg:	db	'>>>>>>>>>>>>>>TESTING SERIAL IO <<<<<<<<<<<<<<<<<',cr,lf
	db	99h	
	end

 










List of 81 messages in thread
TopicAuthorDate
strange behaviour in serial communication            01/01/70 00:00      
   Slow VCC Decay            01/01/70 00:00      
      Get rid of the crappy R/C reset circuit            01/01/70 00:00      
   try this experiment...            01/01/70 00:00      
      totally irrelevant            01/01/70 00:00      
         thanks all            01/01/70 00:00      
            if you are running 5V ....            01/01/70 00:00      
               I agree            01/01/70 00:00      
         What's irrelevant is..            01/01/70 00:00      
            Not irrelevant to evaluate before buying            01/01/70 00:00      
            if this refer to my post ....            01/01/70 00:00      
               I am glad i started such a healthy discussion :)            01/01/70 00:00      
                  not start but restrart            01/01/70 00:00      
                     Will be more threads            01/01/70 00:00      
               to Gary Peek            01/01/70 00:00      
      I doubt that will help            01/01/70 00:00      
   bad news            01/01/70 00:00      
      time to show ...            01/01/70 00:00      
         Oh My Gosh            01/01/70 00:00      
            I do not know to which extent ...            01/01/70 00:00      
               A number of short forms are commonly accepted in formal text            01/01/70 00:00      
                  we are getting distracted here            01/01/70 00:00      
               What I would like to outlaw            01/01/70 00:00      
            SMS? I think not. Just in a hurry to prove...            01/01/70 00:00      
         here is the code again            01/01/70 00:00      
            that code could not possibly produce            01/01/70 00:00      
               but it is ...            01/01/70 00:00      
                  here are the screenshots from hyperterminal            01/01/70 00:00      
                     Still Seems Like...            01/01/70 00:00      
                     Could Also Be            01/01/70 00:00      
                     By the way...            01/01/70 00:00      
                        good advice and an addendum            01/01/70 00:00      
                           supervisor decoupling            01/01/70 00:00      
                              But things are quite slow!            01/01/70 00:00      
                                 yes cutting of DC fixed the issue            01/01/70 00:00      
                                    Are you sure?            01/01/70 00:00      
                                    Oh no it hasn't!            01/01/70 00:00      
                                       ok I agree , lets discuss            01/01/70 00:00      
                                          It depends on what your goals are            01/01/70 00:00      
                                          "DNA scope"            01/01/70 00:00      
                                          The Thing Is            01/01/70 00:00      
                                             Frequent examples            01/01/70 00:00      
   Scope time!            01/01/70 00:00      
      Would this sort of thing be at all helpful?            01/01/70 00:00      
         Quite possibly            01/01/70 00:00      
            I suspect they're all AC-coupled            01/01/70 00:00      
               AC Coupled -- No Good            01/01/70 00:00      
                  More than DC power decay...            01/01/70 00:00      
                  Isn't there some way of conditioning the input?            01/01/70 00:00      
                     No DC Bandwidth            01/01/70 00:00      
                        No argument there ... but ...            01/01/70 00:00      
                           Do you really think...            01/01/70 00:00      
                              Certainly, you're right ... however ...            01/01/70 00:00      
                                 Squeezing DC through AC Channel            01/01/70 00:00      
                                    and, for all practical purposes ...            01/01/70 00:00      
                                    How about this ... ???            01/01/70 00:00      
                                       Invert and add to subract the AC??            01/01/70 00:00      
                                          What about using other sampling hardware?            01/01/70 00:00      
                                             making a scope (sampling or not) is fairly simple            01/01/70 00:00      
                                                true enough ...            01/01/70 00:00      
                                                   USB modems really nifty            01/01/70 00:00      
                                                      Maybe the USB 'scopes are nifty ...            01/01/70 00:00      
                                                         USB 'scopes'            01/01/70 00:00      
                                                            for observing PSU behavior ...            01/01/70 00:00      
                                                               making a scope (sampling or not) is fairly simple            01/01/70 00:00      
                                                                  Well, I haven't tried it            01/01/70 00:00      
                                                                     another approach            01/01/70 00:00      
                                                                        Using hardware as built ... as much as possible            01/01/70 00:00      
                                                                           SiLabs C8051F34x            01/01/70 00:00      
                                                                              Which MCU is used doesn't matter ... yet            01/01/70 00:00      
                                                                                 But it does matter            01/01/70 00:00      
                                                                                    I agree, but ...            01/01/70 00:00      
                                                                        100MHz++ is nice but lots of areas are below 100kHz            01/01/70 00:00      
                                                                           While that works for some ...            01/01/70 00:00      
                                                                              Different tools good at different times            01/01/70 00:00      
                                                                                 no argument from me            01/01/70 00:00      
                                                                                    For one so insistent on answering the question as asked...            01/01/70 00:00      
                                                                                       This should have been a new thread, eh?            01/01/70 00:00      
                                                                                          Yes!            01/01/70 00:00      
                                                   too new, but            01/01/70 00:00      
                                                For crude display ...            01/01/70 00:00      

Back to Subject List