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

UART communication

I am working on a project having three micro controllers....
Out of these three one is master and others are slave....
according to pin conditions of slave,it send some value which is recieve by the master
and showed at lcd....
When I use one of the both slave then it is working properly but when I use both the slave it is not working...
My programming for this..

void uart_init()
{ TMOD = 0x20; SCON = 0x50; TL1 = 0xFD; TH1 = 0xFD; TR1 = 1;
}

void uart_send(bit_8 value)
{ SBUF = value; while(!TI); TI = 0;
}

bit_8 uart_receive()
{ while(!RI); RI = 0; return(SBUF);
}

I am using same program in both slave becoz both have same circuit...but the value send by the slave are differ...

Parents
  • .
    @erik..
    Both of the slave are connected directly to the Rx pin of the master...
    I have studied that I have to give address to both the slave and master..
    But I don't have any idea about how to give address and how to to call them....
    Here i am working on a circuit i can not do any changes to it...
    I can only change my program...
    So any idea about programming...?

Reply
  • .
    @erik..
    Both of the slave are connected directly to the Rx pin of the master...
    I have studied that I have to give address to both the slave and master..
    But I don't have any idea about how to give address and how to to call them....
    Here i am working on a circuit i can not do any changes to it...
    I can only change my program...
    So any idea about programming...?

Children
No data