
附录
- 38 -
104-1816CL2NA
outportb(INDEX_PORT,0x30);
temp = inportb(DATA_PORT)|bit2|bit3|bit4;
outportb(DATA_PORT,temp);
//Enabled gpio3x
outportb(INDEX_PORT, 0x1a);
temp = inportb(DATA_PORT)&(~(bit5|bit4));
outportb(DATA_PORT, temp);
//Enabled gpio2x
outportb(INDEX_PORT, 0x1c);
temp = inportb(DATA_PORT)&(~(bit1));
outportb(DATA_PORT, temp);
}
//复用引脚配置
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x08);
outportb(INDEX_PORT, 0xe2);
temp = inportb(DATA_PORT) & (~bit3);
outportb(DATA_PORT, temp);
outportb(INDEX_PORT, 0xe3);
temp = inportb(DATA_PORT) & (~(bit1 | bit2 | bit3 | bit4 | bit5 |
bit6));
outportb(DATA_PORT, temp);
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x08);
outportb(INDEX_PORT, 0xe4);
temp = inportb(DATA_PORT) & (~bit0);
注意:使用多功能PIN(复用引脚)的GPIO要初始化成GPIO功能。
2.
输入输出编程
//GPIO1,2,3,4 配置为 GPI(输入)
,注意 GPIO 和各个 bit 的对应关系
Содержание 104-1816CL2NA
Страница 11: ...安装说明 104 1816CL2NA 5 2 2 接口位置示意图 LAN1 ...
Страница 42: ...驱动程序安装说明 36 104 1816CL2NA 4 驱动程序安装说明 本产品的驱动程序可依据配套光盘内容安装 在此不做介绍 ...
Страница 51: ......
Страница 61: ...Installation Instructions 104 1816CL2NA 5 2 2 Port Location LAN1 ...