added isr and statemachine interrupt trigger

isr is not yet finished, needs some beautification