Serial Communication
Posted: 08 Jun 2010 06:02
Can any 1 help me ????
i have to send some text from computer to 16F628A PIC and then transmit that text to 18F452 PIC.
i am new so plz help me.
im trying this code.
char *text ;
char *rec;
int i=0;
void Usart_Write_Text(char*);
void main(void)
{
Soft_Uart_Init(PORTB, 1, 2, 1200, 0);
Usart_Init(1200);
TRISB.F2 = 0;
TRISB.F1 = 1;
TRISB.f4=0;
SW1=0;
SW0=1;
SW2=0;
delay_ms(1000);
while(1)
{
do
text = Soft_Uart_Read(rec);
while (!*rec);
if (data==1)
Usart_Write(text);
//i++;
Soft_Uart_Write("");
}
}
i have to send some text from computer to 16F628A PIC and then transmit that text to 18F452 PIC.
i am new so plz help me.
im trying this code.
char *text ;
char *rec;
int i=0;
void Usart_Write_Text(char*);
void main(void)
{
Soft_Uart_Init(PORTB, 1, 2, 1200, 0);
Usart_Init(1200);
TRISB.F2 = 0;
TRISB.F1 = 1;
TRISB.f4=0;
SW1=0;
SW0=1;
SW2=0;
delay_ms(1000);
while(1)
{
do
text = Soft_Uart_Read(rec);
while (!*rec);
if (data==1)
Usart_Write(text);
//i++;
Soft_Uart_Write("");
}
}