hi..i need to design a counter which can count number of switch is click on from 1-9 and display on 7segment display...and it has timer that run 20second, which after 20second it save the number of count into a file register and reset the number of count back to 0 and repeat back the process. i have try the code which i attached here, but it cannot run..i think it has problem with the interrupt and timer process. can someone correct it for me please? i also attached here the design of the circuit and also the code in hex file..thank u..