Updated FSM for simulation test.
Removed port_old in simulation for proper event values from the ISR.
Added simple simulation test in main.