ratheeshbr
Joined: 26 Jan 2011 Posts: 31
|
Software Serial |
Posted: Wed Mar 30, 2011 7:21 pm |
|
|
Hi
I am trying to use two serial communication in PIC16f877a -Software as well as hardware serial. Unfortunately, if I use fprintf( stream,"CCS"), then the hardware serial also wont work!
What may be the problem?
Here is my code
Code: |
#include<16f877a.h>
#use delay(clock=20000000)
#USE RS232(BAUD=4800,errors,PARITY=N,XMIT=PIN_D1,RCV=PIN_D0,BITS=8,stream = CH1)
#USE RS232(BAUD=9600,errors,PARITY=N,XMIT=PIN_C6,RCV=PIN_C7,BITS=8)
void main()
{
char ch;
fprintf(ch1,"CCS");
while(1)
{
delay_ms(1000);
printf("hai");
}
} |
|
|