Heavily modified the micro code to include interrupt for edge detectioin