text1.c

来自「老实说了」· C语言 代码 · 共 20 行

C
20
字号
#include <reg51.h>
#include<stdio.h>
Uart_Init();
main()
{	Uart_Init();
	EX0=1;
	EA=1;
	while(1);
}
void int0() interrupt 0 using 0
{	printf("External Interrupt 0 responded\n");
}
Uart_Init()
{SCON = 0x52;    /* 设置串行口控制寄存器SCON*/
 TMOD = 0x20;    /* 12M时钟时波特率为2400  */
 TCON = 0x69;    /* TCON */
 TH1 =  0xf3;    /* TH1 */
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?