Designing digital counter and 7-segment display driver