This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051 serial interfacing

hey frnds. i have problem in sending char serially in normal program. when i try to send 'A' it sends '?'. this is my program. plz help me guyz to solve this problem.

#include<reg51.h>
void main(void)
{
        TMOD=0x20;
        TH1=0xFD;
        SCON=0x50;
        TR1=1;
        while(1)
        {
        SBUF='A';
        while(TI==0);
        TI=0;
        }
}

Parents
  • this is my program.

    No, it's not. It's clearly somebody else's program which you copy-pasted without knowing how it works.

    If this were actually your program, you would have had to ask yourself a lot of questions, and find answers to those questions before you could write a program. Along that way, you would have gathered the knowledge needed to understand why this program cannot do what you wanted yours to do. But you did none of that, which is why you have learned nothing from this homework exercise. In other words: you failed.

Reply
  • this is my program.

    No, it's not. It's clearly somebody else's program which you copy-pasted without knowing how it works.

    If this were actually your program, you would have had to ask yourself a lot of questions, and find answers to those questions before you could write a program. Along that way, you would have gathered the knowledge needed to understand why this program cannot do what you wanted yours to do. But you did none of that, which is why you have learned nothing from this homework exercise. In other words: you failed.

Children
No data