C167CR-LM GPT1 Core Timer T3 How does it work?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello Everyone,
Apologies upfront, I'm quite new to µcontrollor programming and just started to learn, so i probably got few thinks not right yet.


I've got questions about the T3 Timer. Today at my School I've encountered this timer for the first time but I'm not sure what this
does(we just scratched the Topic). I'm aware that the T3CON register controlles the timer and that this timer can run as simpler counter OR as a Clock.

My confusion starts when i use the Clock with an prescaler. According to the Manual If i have the CPU running at 20 Mhz
and I choose as prescaler a factor of lets say 256 my period will be 840ms with an resolution of 12.8µs. The Input frequency
would be then 78.125kHz.


  • What Number would then stand in the Register T3 every tick?
  • How is the period or where is the period applied to?
  • Where goes the Input frequency into?
  • What does the gated Mode or how does it work?





I hope some of you can enlighten me 🙂
0 Likes
2 Replies
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
I don't understand all of your questions, so I will give you my feedback based on my understanding.

What Number would then stand in the Register T3 every tick?
It is the resolution at that in your case it is at 12.8us

How is the period or where is the period applied to?
In what purpose?

The period is the full 16-bits of the register so
w
here goes the Input frequency into?
This is the clock frequency that T3 changes (increment or decrement)

What does the gated Mode or how does it work?
There is a section in the manual that describes this. In T3 Gated Timer Mode, the input clock of T3 is gated by the external input pin T3IN. You can control the level at which it gates the clock (think of it as run enable controlled by a port pin)

0 Likes
Not applicable
Thanks alot for your answer!

What Number would then stand in the Register T3 every tick?
It is the resolution at that in your case it is at 12.8us


Are these then accumulated? Otherwise It would not make any sense. If i just have the 12.8µs standing there. Shouldn't it be the Sum of all 12.8µs till the timer reachs 840ms?
If this is true my second question would be obsolete.
0 Likes