Reading 5 digital input pins (5 bit) to change clock frequency