Hii, I Think I see your problem
Master slave communication can be made by 2 protocol (I think) :
1. SPI
2. RS-485 Multinode
If I see your configuration schematic, you just use UART it means sigle node communication. For RS-485 you have to add some device for protocol example max 485. (if you use this you don't have to use max 232).
you can see the detail in this link **broken link removed**
and for Master Slave Communication the setting of is diffrent.
for UART 9600 bps 8 bit.
for master slave communication 9600 bps 9bit.
And you must declare the address of master and slave please check this sample.
this take from atmel appnote for master initialization :
Void initmaster(void)
{
SCON = 0xfo // uart in mode 3
$ADDR = 0X01 // this master addres
$ADEN = 0Xff // addres mask
TMODE = TMOD | OX20 // timer 1 in mode2
THI1 = oxfd // setting baudrate 9600 bps
TL1 = 0xfd
ES=1 // enable serial interrupt
EA = 1 // enable global interrupt
TR = 1 // start timer 1 running
}
this take from atmel appnote for slave initialization :
void initslave()
{
SCON = 0xfo // uart in mode 3
$ADDR = 0X03 // this slave addres
$ADEN = 0Xff // addres mask
TMODE = TMOD | OX20 // timer 1 in mode2
THI1 = oxfd // setting baudrate 9600 bps
TL1 = 0xfd
ES=1 // enable serial interrupt
EA = 1 // enable global interrupt
TR = 1 // start timer 1 running
}
Please check this link for more detailed sample source code :
UART Master Slave
http://www.atmel.com/dyn/resources/prod_documents/doc4346.pdf
SPI Master Slave
http://www.atmel.com/dyn/resources/prod_documents/doc4348.pdf
Hope this help U
Deny(Bodat'z)