Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
can i configure the TMOD to be used both as a timer and a counter at the same time, say TMOD=0x25?
Yes, Since the lower 4 bits are for timer/counter 0. and higher 4 bits for timer/counter1.
To use as Timer0: Clear C/T bit of TMOD (2nd bit for timer/counter0).[3rd bit from right]
To use as Timer1: Clear C/T bit of TMOD (6th bit for timer/counter1).[7th bit from right]
To use as counter0: you have to SET 0 bit of TCON [righmost bit] and 2nd bit of TMOD[3rd bit from right].
To use as counter1: SET 2nd bit [3rd from right] of TCON and 6th bit [7th bit from right] of TMOD.