4051 uart interrupt1 8051/4051 UART Interrupt #include /* Include x51 header file */ void Ext_int_Init() { EA = 1;/* Enable global interrupt */ ES = 1; /* Enable serial interrupt */ } void UART_Init() { TMOD = 0x20;/* Timer 1, 8-bit auto reload mode */ TH1 = 0xFD;/* Load value for 9600 baud rate */ SCON = 0x50;/* Mode 1, reception enable */ TR1 = 1;/* Start timer 1 */ } void Serial_ISR() interrupt 4 { P1 = SBUF;/* Give received data on port.. 공학속으로/마이컴 2020. 3. 3. 이전 1 다음 💲 추천 글