2.13phatxungtilelaplai

18 0 0
                                        

/*

Chuong trinh ket hop cac bo dem cua 8253 de tao ra song vuong co tan so va do rong xac dinh.

*/

#include "stdafx.h"

#include<conio.h>

#include<stdio.h>

#include<dos.h>

#include<PCIXP.h>

void main()

{

int add=Get_Addr("PCI_8255");

outportb(add+11, 0xB6); // Dung bo T 2 che do 3

outportb(add+10, 0x28); // Chia 40 lan (0x28 = 40) , dam bao xung phat ra co do rong 40us

outportb(add+10, 0);

outportb(add+11, 0x74); // Bo dem T1, che do 2

outportb(add+9, 6); // Chia 6 lan, dam bao sau 5 xung clock 40us, out1 se xuong thap

outportb(add+9, 0);

printf("

Chuong trinh tao song vuong co muc thap 40us, muc cao 200us.");

getch();

}

You've reached the end of published parts.

⏰ Last updated: Dec 31, 2008 ⏰

Add this story to your Library to get notified about new parts!

2.13phatxungtilelaplaiWhere stories live. Discover now