hi..im currently working with a pic16f877a and a sc16a servo controller.
my question is, how do i trasfer my command from pic to sc16a? is it by enable the uart of the pic?
kane WROTE:hi..im currently working with a pic16f877a and a sc16a servo controller.
my question is, how do i trasfer my command from pic to sc16a? is it by enable the uart of the pic?
#define BAUD 9600
#define _XTAL_FREQ 20000000
void uart_init(void)
{
TXSTA=0b10100000;
RCSTA=0b10010000;
SPBRG=(int)(_XTAL_FREQ/(64.0*BAUD)-1);
}
Users browsing this forum: No registered users and 20 guests