Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
HANEL
PROGRAMMING
IN C(cont’)
.....void main() {cnt=0; //set counter to 0TMOD=0x42;TH0=0x-46; //10 KHzIE=0x86; //enable interruptsTR0=1; //start timer 0while (1); //wait until interrupted}