想问下大家怎么去实现mini51 ISP,由串口改成485的Bootloader 如何在下面的中断中加个软中断,并且如何去测试写的ISP RS485通讯成功的呢?
void UART0_IRQHandler(void)
{
/*----- Determine interrupt source -----*/
if (inpw(&UART0->ISR/*COM_ISR*/) & 0x11) //RDA FIFO interrupt or RDA timeout interrupt
{
while(((inpw(&UART0->FSR/*COM_FSR*/) & (0x4000)) == 0) && (bufhead < 64))//RX fifo not empty
uart_rcvbuf[bufhead++] = inpw(&UART0->RBR/*COM_RX*/);
}
if(bufhead == 64)
{
bUartDataReady = TRUE;
bufhead = 0;
}
} |