dsPIC30F4011如何輸出SPWM?
|
||||
---|---|---|---|---|
初級會員
|
如題
請問各位大大 dsPIC30F4011如何輸出SPWM? 程式該如何寫呢? 有可參考的程式嗎?
發表於: 2009/5/30 21:38
|
|||
|
Re: 使用OC模組
|
||||
---|---|---|---|---|
初級會員
|
意思是說,除了FRC外
其餘LP、XT、XTL、HS都可以用就對了 是嗎?
發表於: 2009/4/14 9:37
|
|||
|
Re: 使用OC模組
|
||||
---|---|---|---|---|
初級會員
|
謝謝,您的建言!!
發表於: 2009/4/13 11:32
|
|||
|
Re: 使用OC模組
|
||||
---|---|---|---|---|
初級會員
|
我是使用dsPIC30F4011
這顆PIC不是16bit的嗎? 您說的8bit的解析度 是要去哪裡設定 另外OSC震盪器的選擇 XT,EC,FRC(w/PLLxx) 哪個比較穩定 可以教我嗎?
發表於: 2009/4/13 10:34
Edited by hello074 on 2009年04月13日 11:03:14
|
|||
|
使用OC模組
|
||||
---|---|---|---|---|
初級會員
|
在OC模組,輸出PWM訊號
我設定頻率為20khz,Duty cycle為50.0% 發現到Duty cycle並不是一直都在50.0% 而是49.8%~50.2%晃動 這是什麼原因?timer or ..... 另外,馬達的PWM模組也是一樣 難道就不能固定一個值嗎 我想要PWM有0.1%的變化精度 這樣一來就都失真了 有什麼方法可以解決的嗎? 謝謝
發表於: 2009/4/13 9:50
|
|||
|
Re: ICD2
|
||||
---|---|---|---|---|
初級會員
|
參照:
已解決了,謝謝
發表於: 2009/4/12 1:07
|
|||
|
ICD2
|
||||
---|---|---|---|---|
初級會員
|
我在連結ICD2時產生了以下字串
Connecting to MPLAB ICD 2 ...Connected Setting Vdd source to target ICDWarn0020: Invalid target device id (expected=0x101, read=0x0) ...Reading ICD Product ID Running ICD Self Test ... Failed Self Test. See ICD2 Settings (status tab) for details. MPLAB ICD 2 Ready 後來我找了一下說明 ICDWarn0020: Invalid target device id (expected=ExpectedID, read=ReadID) (OK) MPLAB ICD 2 has read the device ID of the target device and found it different than expected for the device type selected within MPLAB IDE. If ReadID is 0 then it is likely that the target device is not powered, not connected, or simply missing. In any case, this is just a warning that MPLAB ICD 2 has not found the expected target device. Click OK to proceed. 請問這是什麼原因 我是使用APP020的板子 我以前安裝時都不會這樣 怎麼解決
發表於: 2009/4/11 14:24
Edited by hello074 on 2009年04月11日 14:54:14
|
|||
|
Re: 輸入捕捉
|
||||
---|---|---|---|---|
初級會員
|
[quote]
Ryang 寫道: 如果待量測的 Period 為 10KHz,那 Capture 的計數頻率就要 10MHz,這樣才可以準到 0.1% 的精度。 Capture 的計數頻率是指FCY 還是timer, 如果是timer要設定哪個暫存器? 可以舉例嗎?
發表於: 2009/4/10 16:27
|
|||
|
PIC能處理嗎?
|
||||
---|---|---|---|---|
初級會員
|
void main(void)
{ int a=2,c; int b=0; int i; i=b-a; if(i>0) c=1; else if (i<0) c=3; while(1); } 以上是我簡單的程式測試 結果應該為b-a=-2 但是我看了 i 的變數其值為65534 這樣是對的嗎? 雖然可以執行程式 但心裡總是怪怪的 不知以後碰到大程式該怎麼處理 有什麼方法可以顯示負號嗎?
發表於: 2009/4/9 16:41
|
|||
|