| ??? 09/23/03 14:53 Read: times |
#55229 - Serial Send interrupt concept |
First of all, thank you members in this forum who gives a lot of helpful suggestion to me.
I am sorry that i want to raise question again. My problem is about the serial send interrupt problem. I can send out data through ---------------------------------- SBUF=0xff; wait: if (TI==0) goto wait; TI=0; ------------------------------ However, we i try to send data out through serial interrupt method but can't success. My testing code is as shown in the following: any wrong part on my code? #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) {SBUF='a';} } } void RX() interrupt 4 { char temp; if (TI) //clear TI flag { TI=0; } if (RI) { RI=0; temp=SBUF; P0=temp; } } void delay(int x) { int m; for (m=0;m<x;m++); } //THANK FOR YOUR HELP |
| 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 |



