char UART_BUFFER[BUFFER_SIZE],temp,i;
UINT16 u16CNT=0,u16CNT1=0;
bit riflag;
/**
* FUNCTION_PURPOSE: serial interrupt, echo received data.
* FUNCTION_INPUTS: P0.7(RXD) serial input
* FUNCTION_OUTPUTS: P0.6(TXD) serial output
*/
void SerialPort0_ISR(void) interrupt 4
{
if(RI)
{
RI = 0;
UART_BUFFER[u16CNT++] = SBUF;
if(u16CNT==N)
{
riflag = 1;
}
}
}
/************************************************************************************************************
* Main function
************************************************************************************************************/
void main (void)
{
P12_PushPull_Mode;
P06_Quasi_Mode;
P07_Quasi_Mode;
SCON = 0xD0; // Special setting the mode 3 and
TMOD |= 0x20; //Timer1 Mode1
一周热门 更多>