I decide to make a simple digital calculator with my own components, seven-segment display. PIC16F876A, and push button, etc. However it's not useful in current application because a calculator presents in many electronics device such as a smart phone, tablet, and personal computer, etc.
A DIY Calculator Using PIC16F876A
This calculator is able to handle up to 8 digits, including a negative sign. It can perform arithmetic addition, subtraction, multiplication, and division. The data type is only signed integer number.
I use MikroC Pro for PIC to program this typical 8-bit controller. The total lines of code is quite high.
Display multiplexing is very common for most microcontroller programming and interfacing. In usual, a controller could drive up to 8 digits before we can see its display flickering. In this programming example, I use only two digits of 7-Segment display. Because it's easy to build the circuit with a little of source codes.
Program simulation in Proteus
Controller keeps track of counting an external pulse generated by SW1 switch pressing. The maximum press counting is 60 before it rolls down to 0. The display will become flicker whenever the input switch has a longer press duration, but it's not longer than 250ms.