Skip to content

Instantly share code, notes, and snippets.

@komponenrobot
Created May 28, 2019 12:33
Show Gist options
  • Save komponenrobot/318d6873ad63f840e36415df7e485c28 to your computer and use it in GitHub Desktop.
Save komponenrobot/318d6873ad63f840e36415df7e485c28 to your computer and use it in GitHub Desktop.
Cara hitung prescaler dan periode timer pada stm32
mengatur timer 40ms = 0,04s (25Hz)
clock / (prescale +1)
72.000.000/ (7199+1) = 10.000
Periode = (10.000 / 25 )-1=400-1=399
==> nilai timer yang diinginkan dijadikan dalam satuan frekuensi (Hz)
==> nilai prescaler kita tentuin sendiri, terserah.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment