| ??? 09/23/03 15:21 Read: times |
#55239 - RE: Serial Send interrupt concept Responding to: ???'s previous message |
THank erik again!
I know that i should send data out when the TI was set. any i have modify the code according to ur suggestion. {if (TI)SBUF='a';} if seems doesnt work. I have no problem to send out the data by polling the TI bit. How can i send a array[8] out byte by btye through serial interrupt method? also, may i use the poll TI method to send data, and use the interrupt method to receive data? any draw back if i to do so. #include <AT89X51.H> void delay(int x); void main () { char ind=0; TMOD=0x20; TH1=-03; TR1=1; SCON=0x50; IE=0x90; P2_7=1; delay(20000); while(1) {if (TI)SBUF='a';} } void RX() interrupt 4 { char temp; if (TI) //clear TI flag { TI=0; } if (RI) { RI=0; temp=SBUF; P0=temp; } } |
| Topic | Author | Date |
| Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
| RE: Serial Send interrupt concept | 01/01/70 00:00 | |
more serial drivers... | 01/01/70 00:00 |



