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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/12/01 09:57
Read: times


 
#9235 - RE: UART transmission error
Hi Jacky,

I think I found what you're looking for. At 2400 baud, it takes a little longer than 4ms to transmit/receive one character. But in your display routine allone there are 2 delays of approximatly 2.5ms. And I'm not even talking about the busy delays from your display.
Your interrupt routine takes longer to execute than the interrupt repetition rate. This results in lost characters.

There is another reason why you should never handle the display in an interrupt routine. In this case it does not matter, becaus you have an empty main loop. But if your main program handles the display too, you are likely to get into trouble when the interrupt routine interrupts display handling of the main program.

Finally I found something strange in your code:
mov 20H,#0
mov 20H,A

Why do you fill 20H with 0 first, and then with A?

Good luck with your experiments.

List of 10 messages in thread
TopicAuthorDate
UART transmission error            01/01/70 00:00      
My codings            01/01/70 00:00      
My codings            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      
RE: UART transmission error            01/01/70 00:00      

Back to Subject List