Microcontroller › 8051 › Understanding of Timer and Counter › Timer and Counter
Hi,
Counter – If Input clock to the timing system is given on the external pin it is used as counter. If you want to calculate i.e to count the the input signal changes occuring to the microcontroller.
eg. connecting the pushbutton to the pin and defining it as a counter you can keep counting how many times the button is pressed.
Timer- If the microcontroller own clock soucre is used as a clock input it can be used as a timer. That if we want to measure the duration of the event, or to determine the delay in the event happening.
eg: As explained to the counter, connecting the pushbutton to the microcontroller pin and defining it as timer and calculating the delay between the button pressed.
For register information refering to datasheet of particular controller will provide the clear information.