Callating timetera expecies conficution acks act intervals, which ik criticake for real- timee proprications.

Understanding Timer Basic

Suatu waktu suatu hari ketika sistem counts berasal dari clock cycles generate delays or trigger events. The tirr extentententency depends on the stempm clock and the prescaler setting s. Adjusting these parmeters alloves for presse timing controll.

Calculating Timer Frequencies

Kam general formula for timelr expeency is:

FLT: 0; 3; Timer Frequency = Systemm Clock / (Presceler × Timer Count) Syon1; FLT: 1: 323;

Dimana:

  • Pertama; FLT: 0: 0 = 33; System Clock = 1; FLT: 1 After3;: Te main clock extenency of the microcontroller.
  • 1f 1f; FLT: 0 = 0 = 33. Prescaler = 1; FLT: 1 = 3; 1f; Divides the systemm clock to slow down the timer.
  • 111; FLT: 0 = 0 = 33; Timer Count 1; WAR1; FLT: 1: 1 ASA3;: Te value haded atotir reistor.

Periksa Kalkulation

Supposetthom clockis16 MHz, the prescaler its seto 64, and the timer count is 250. The tirr expecy is is is kalkulated as:

1; 131; FLT: 0 = 0 = 33; 16,000,0000 / (64 × 250) = 1,0000 Hz 131; FLT: 1; 13,3;;

Ini berarti bahwa pemicu waktu setiap 1 milidetik.