⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8255a.c

📁 KeilC开发,51通过8255对外部4*4键盘进行控制.按键分别为0-9以及上下左右,加上确认取消.
💻 C
字号:
#include <reg51.h>
#include <8255A.h>

sbit RST = P1^4;

void Init8255A()
{
	int i;

    i = 5000;
	RST = 1;
	while (i--);
	RST = 0;
	SelectForm0(0,0,0,0);
}

void SelectForm0(char A, char C1, char C2, char B)
{
	char temp;

	temp = 0x80;
	temp = temp | A<<4 | C1<<3 | C2 | B<<1;
	Commd = temp;
}

void SetCBit(char index, bit value)
{
	char temp;

	temp = index << 1;
	if (value) temp++;
	Commd = temp;
}



⌨️ 快捷键说明

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