8253的CLK0接1MHz时钟,GATE0接+5V,OUT0接8255的PA0,K8跳线接喇叭,编程使计算机的数字键1、2、3、4、5、6、7、8作为电子琴按键,按下即发出相应的音阶.#includestdio.h#includeconio.h#include "..\\ApiEx.h"#pragma comment(lib,"..\\ApiEx.lib")char led[10]={ 0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f}; /*从1-8对应的段码表*/int time[]={120,106,94,89,79,70,63,59}; /*82 Read More
posted @ 2010-12-22 21:53
杨小七
Views(300)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号