arunbharathi.arasu
Full Member level 2
- Joined
- Feb 28, 2013
- Messages
- 134
- Helped
- 7
- Reputation
- 14
- Reaction score
- 6
- Trophy points
- 1,298
- Location
- Chennai, Tamil Nadu, India
- Activity points
- 2,151
hi friends,
i have problem in pic16f870 uart.
i don't know where the problem is.....
can any one help me...
below i post my code..
- - - Updated - - -
baud rate is 9600;
frequency is 12MHZ;
i have problem in pic16f870 uart.
i don't know where the problem is.....
can any one help me...
below i post my code..
Code:
#include<htc.h>#include<string.h>
uart_send(unsigned char*s)
{
while(*s != '\0')
{
TXREG=s;
while(TXIF!=0);
s++;
}
}
void main()
{
TRISC6=0;
SPBRG=77;
BRGH=1;
SYNC=0;
SPEN=1;
TXIE=0;
TX9=0;
TXEN=1;
while(1)
{
uart_send("WELCOME");
}
}
- - - Updated - - -
baud rate is 9600;
frequency is 12MHZ;