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
  • I think most people have learn lots of their skills from looking at other peoples code.

    But it really is 100% important to look at every single line and understand it. If it can't be understood with available documentation then the code is either for a black-magic processor (like some driver code in a Linux system, where the manufacturer did write the code based on undocumented knowledge) or the original author did something wrong. Or the code is just solving an advanced problem at a skill level too far ahead.

Reply
  • I think most people have learn lots of their skills from looking at other peoples code.

    But it really is 100% important to look at every single line and understand it. If it can't be understood with available documentation then the code is either for a black-magic processor (like some driver code in a Linux system, where the manufacturer did write the code based on undocumented knowledge) or the original author did something wrong. Or the code is just solving an advanced problem at a skill level too far ahead.

Children
No data