1. 程式人生 > >小蜜蜂微控制器串列埠傳送字串

小蜜蜂微控制器串列埠傳送字串

void UART0_SendString(unsigned char *String, int start, int stop)
{
	int i = 0;

	if (stop <= start)
	{
		stop = start;
	}
	for (i = start; i <= stop; i++)
	{
		SCON0_TI = 0;
		SBUF0 = String[i];
		while (!SCON0_TI)
			;
	}
}