Redarding serial receiver and transmitter

Status
Not open for further replies.
I'm suggest you to use the serial interrupt and buffer to receive the serial data. It is better.
 

your code is completely wrong and it should not work. first of all you have misused while loop, Second Rx function calls itself-an infinite loop within an infinite loop. First learn about Interrupt Service Routine(ISR), then handle transmission interrupts(Rx, Tx) in their corresponding ISR. As Others suggested it will be better to implement a buffered scheme for your ISRs.
 

you should ,first return from isr otherwise how you can re-enter in it on event ?

Rx(){
while (1)
{ (RI=1);
ACC = 0000;
ACC = SBUF;
P1 = ACC;
Tx();---------------------------------error remove it
RI = 0;
Rx();---------------------------------error remove it
}
}
 


After removing the two (tx(), rx()) warning shows as uncalled segment, ignored for overlay process
Segment: ?pr?tx?rxtx?
 

Hi,

Exclude the function definitions of Tx & Rx . I hope you are done with ISR code.



With Regards
S.Rajesh Kumar
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…