Re: PIC18F4431 PWM Module範例程式疑問
|
||||
---|---|---|---|---|
資深會員
|
各位先進,不知我的算法是否對錯...
因為我很想知道,自己有沒有算錯... 謝謝
發表於: 2006/4/24 19:45
|
|||
|
Re: PIC18F4431 PWM Module範例程式疑問
|
||||
---|---|---|---|---|
資深會員
|
如果要產生20KHZ
外部振盪16MHZ 一各指令週期是 Fosc/4=4MHZ Tosc=1/4MHZ=0.25us 那要產生週期20KHZ ==>(199+1)*0.25us=50us PTPER=200/4=50-1=49 不知道是否是這樣計算?
發表於: 2006/4/21 14:47
|
|||
|
PIC18F4431 PWM Module範例程式疑問
|
||||
---|---|---|---|---|
資深會員
|
F4431_PWM_Demo的C語言範例中為什麼PTPER=99,則PWM的Period = 100 us?而PDC0=200則Duty Cycle =50%,PDC1=300,則Duty Cycle =75%
發表於: 2005/8/2 19:10
|
|||
|