logo

Crowdly

[AVR-INT CPMK-19] Rudi ingin membuat program yang memicu interrupt setiap 1000...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

[AVR-INT CPMK-19]

Rudi ingin membuat program yang memicu interrupt setiap 1000ms. Setiap 1000ms LED ON kemudian OFF pada 1000 ms berikutnya secara bergantian (blink).

Jika:

  • frekuensi clock adalah 100Hz
  • kemunculan per digit counter (0,1, 2..n) membutuhkan 1 clock cycle
  • tanpa prescaler
  • setelah nilai counter n tercapai, TCNT diset ke 0 oleh hardware
  • 1s = 1000ms

maka tentukan konfigurasi kecepatan timer dan nilai counter

...

;set kecepatan timer

ldi r16, $

out , r16

;set compare match counter

ldi r16, ;dalam desimal

out , r16

...

More questions like this

Want instant access to all verified answers on scele.cs.ui.ac.id?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!