
	/* Mode 3: 9-bit uart, VARIABLE 31250 baud rate */
	TH1  = 	0xFE; 
	TB8 = 1;
	REN = 1;
	RB8 = 0;

	/*This function addresses a particular slave and makes it ready for data reception*/


	void delay(void)
	{
		unsigned char i;
		for(i=255;i;i--) ;
	}

	void enableSlaveToReceive(unsigned char slave_id)
	{
		TB8 = 1;	    /* set bit 8, for address transmission */
		SBUF = (sid | 0x10);/* General Broadcast address - all slaves receive this */
		delay();  /* short delay to give time for slave to check address
			    and switch over from address to data reception mode*/	
	}

	/*The addressed slave becomes ready and starts receiving forthcoming data bytes thro this function*/

	void sendData(unsigned char i)
	{
		TB8 = 0;	/* address sent, now set for data transmission */
		SBUF = i ;	/* send acknowledged data */		
	}

