usart not working properly in pic 16f877a

i am posting my code for simple transmission through uart #include unsigned char s[]={"abcd"};

int main() { SPBRG = 31; SYNC=0; SPEN =1; TRISC = 0XC0; CREN=1; TXEN=1; INTCON=0XC0; for( int i=0;i

Reply to
sarath tv
Loading thread data ...

SPBRG=129; SYNC=0; TX9=0; RX9=0; SPEN=1; CREN=1; TXIE=0; RCIE=1; TXEN=1; PEIE=1;

I have the following to run a pic16F877 at 20mhz and 9600 bps. But the communication is interrupt based. see ser.c for this

--- news://freenews.netfront.net/ - complaints: snipped-for-privacy@netfront.net ---

Reply to
Andre

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.