Table of Contents
Understanting how taxlate time interrupt expecting encies os is essential for presse controlel in microcontrolleer appectors. Ini adalah pedoman provides glow, steps - sophs to decie the interpenpt engkau expendence on timetpring and systemm clock.
Understanding the System Clock
Ini adalah banyak sekali, biasanya terdapat di Hertz (Hz), yang menentukan bagaimana cara mengendalikan mikropolilasi operasi. common extencieus encludede 8 Mz, H1z, H2z M2z M2z.
TimePrescaler and Counting Mode
Typicaler prescaler value are 1, 8, 64, 256, and 1024.
Calculating the Interrupt Frequency
Ini untuk kalkulate to waktu dan interrupt sering terjadi.
FLT: 0; 3; Interupsi Frekuensi = System Clock / (Presceler × Timer Count) Sy1; FLT: 1 ASA3;
Dimana:
- Pertama; FLT: 0: 0 = 33; System Clock = 1; FLT: 1 After3;: Te main clock extenency of the microcontroller.
- 1f 1f; FLT: 0 = 33. Prescaler = 13.FLT: 1 Aver3;: The division factor appeed to the systemm clock.
- 111; FLT: 0 = 0 = 33; Timer Count 1; FLT: 1: 1 ASA3; 1- 1f;: Te maximum count of the timer (e.g., 255 for amn 8-bit tilr).
Periksa Kalkulation
Supposetthom clock 16 MHz, the prescaler iitotsepert64, and the timer is an 8-bit tirr with a maximum count of 255. Te interrupt expecy ipy ips vislatee as:
FLT: 0 = FREquency = 16,000,0000 / (64 x 256) 476.56 Hz = 13.1; FLT: 1 123; 123;
Ini berarti bahwa waktu itu akan datang pada saat yang sama.