choura
Member level 1
I'm using pic16f877a, crystal 4MHz with RF 434MHz but still doesn't working.
my program for Tx
void main()
{
TRISB = 0xFF;
PORTB = 0;
UART1_Init(9600); // Initialize UART module at 9600bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
UART1_Write(PORTB); // and send data via UART
Delay_ms(500);
}
}
the second part of Rx is
void main()
{
TRISB = 0;
PORTB = 0;
UART1_Init(9600); // Initialize UART module at 9600bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
if (UART1_Data_Ready())
{ // If data is received,
PORTB = UART1_Read(); // read the received data,
}
}
}
please help brothers
my program for Tx
void main()
{
TRISB = 0xFF;
PORTB = 0;
UART1_Init(9600); // Initialize UART module at 9600bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
UART1_Write(PORTB); // and send data via UART
Delay_ms(500);
}
}
the second part of Rx is
void main()
{
TRISB = 0;
PORTB = 0;
UART1_Init(9600); // Initialize UART module at 9600bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
if (UART1_Data_Ready())
{ // If data is received,
PORTB = UART1_Read(); // read the received data,
}
}
}
please help brothers