Statemachine based implementation of the LCD control panel