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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/10/03 21:09
Read: times


 
#45199 - Serial Port too quick
Hi all,
I'm using the serial pot at 9600 baud to interface 2 at89c52, when I send one byte at the time its all right, but when I try to send more bytes in sequence just the last one gets received. I tried to implement an input buffer on ext ram but the problem continues. here are my code:

on the 1st board (receiving):

GetSerial:
jnb RI, GetSerial
mov a, SBUF
clr RI
ret
; Main loop
Loop:
jnb RI, _restofcode
acall GetSerial
_restofcode:
... some code
sjmp Loop

on the 2nd board (transmiting):

get_dptr:
movx a, @dptr
inc dptr
ret

SendACC:jb TI, SendACC
mov SBUF, a
*** acall DelayX
ret

ParseID3:
mov dptr, #0x0000
acall get_dptr
acall SendACC
acall get_dptr
acall SendACC
acall get_dptr
acall SendACC
ret

The interrupt routine for the serial port just clears the TI if set.
If I call the DelayX routine marked with *** the bytes get send correctly but if I dont do any delay betwen char I just get the last one.

Any ideas? Thanks, Gabriel.

List of 3 messages in thread
TopicAuthorDate
Serial Port too quick            01/01/70 00:00      
   RE: Serial Port too quick            01/01/70 00:00      
      RE: Serial Port too quick            01/01/70 00:00      

Back to Subject List