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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/24/03 04:42
Read: times


 
#51274 - Serial interrupt
Hi all,

... in all of a sudden ... I was given this buggy-almost-done-code (so said the manager)... and it has to be I to debug it (don't know why). It always sucks (at least for me) debugging other people code :(

First, let me share it with you :D ....in general point of view.

It should:
1. Receive stream using '51 USART port in interrupt mode.
2. Identify command (first 5 chars in the stream) and do something based on that. It has to compare the first 5 chars with predefined string such "ABCDE".

The architecture:
1. all global vars are placed in XRAM segment
2. receive and transmit array buffers are separately placed in XRAM segment.
3. all pointer to those buffers are placed in XRAM segment.
4. Serial ISR simply places incoming char in receive buffer and check tail and head pointer.

The problem(s):
Why stream receiving processes depends on char transmission?
It seems that it has to transmit a char such '*' (or whatever) every time a char is received, but the NULL (0x00) char do not work in this case.

What should I check?

I hope I picture it clear.

TIA
~fhy


List of 7 messages in thread
TopicAuthorDate
Serial interrupt            01/01/70 00:00      
   RE: Serial interrupt            01/01/70 00:00      
      RE: Serial interrupt - code snippets            01/01/70 00:00      
         RE: Serial interrupt - code snippets            01/01/70 00:00      
   RE: Serial interrupt            01/01/70 00:00      
      RE: Serial interrupt            01/01/70 00:00      
         RE: Serial interrupt            01/01/70 00:00      

Back to Subject List