Author |
Message |
Topic: PWM frequency for Timer2 |
ProgPath
Replies: 7
Views: 20291
|
Forum: General CCS C Discussion Posted: Mon Sep 21, 2020 1:55 am Subject: PWM frequency for Timer2 |
Thanks very much! Very nice of you guys. |
Topic: PWM frequency for Timer2 |
ProgPath
Replies: 7
Views: 20291
|
Forum: General CCS C Discussion Posted: Sun Sep 20, 2020 8:43 pm Subject: PWM frequency for Timer2 |
what's the purpose of "4"?
Did you read Ttelmah's post ? He gave the reason for the '4'.
Hello,
Yes, I read what Ttelmah wrote: "The key things to note are the '+1', and that i ... |
Topic: PWM frequency for Timer2 |
ProgPath
Replies: 7
Views: 20291
|
Forum: General CCS C Discussion Posted: Sun Sep 20, 2020 5:28 pm Subject: PWM frequency for Timer2 |
Thanks very much!
PWM Freq = (64*10^6) / {(140+1)*(4)*4} = 28368.9 Hz
Crystal Frequency
PWM Freq = -----------------------------------------
(PR2 ... |
Topic: PWM frequency for Timer2 |
ProgPath
Replies: 7
Views: 20291
|
Forum: General CCS C Discussion Posted: Sun Sep 20, 2020 2:43 am Subject: PWM frequency for Timer2 |
Hello,
It's about PIC18F46K22 running at 64 MHz.
I was trying to understand a code which says:
setup_timer_2(T2_DIV_BY_4, 140, 1); // PWM frequency is 28.369 kHz
I think that Timer ... |
|