with these mikroc 6 ALSO i use xbee regulated board
(is that a must to include files ? and if yes what file should i include)
RECIRVER:
unsigned short i;
unsigned short data = 0, ro = 0;
unsigned short *rec;
void main() {
// initialize USART module
PORTC = 0;
TRISC = 0B10000000;
PORTB = 0;
TRISB = 0;
PORTB = 0b10100000;
rec = &ro;
Soft_Uart_Init(PORTC,7,6,9600,0) ;
do{
do {
data = Soft_Uart_Read(rec);
PORTB = 0B00010000;
}
while (!*rec);
/* Now we can work with data: */
if (data==0XFF)
{
PORTB = 0B11110000;
Delay_ms(1000) ;
//if (data==0XEE) // i put this useless condition as i must use the write function "Soft_Uart_Write(data)" associated to
//read function" Soft_Uart_Read(rec);" as i knew
//{
// Soft_Uart_Write(data);
//}
}
else {PORTB = 0B11000000;
Delay_ms(1000) ;
}
}
while (1) ;
}//~!