added direct pin manipulation using set, clear and toggle registers