• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: ㄧ些使用 dsPIC 後的問題....
#11
版主
版主


查看用戶資訊
腳位功能的修先順序為:

如有AD輸入功能,則AD優先。

若其它週邊功能打開,相對的 I/O 腳應依其週邊功能設為輸出或輸入模式,如 PWM 的輸出打開則相對的 PORT 的腳位就要設為 output; 如設為 I2C 模式則 SCL & SDA 就要設為輸入模式。

發表於: 2005/1/21 16:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#10
中級會員
中級會員


查看用戶資訊
由 Ryang 於 2005-01-21 09:44:11

你忘記將AD輸入腳功能關掉了。


是否由於PORTB腳位預設為 Analog,因此要有關閉AD的動作,對於其他IO腳位是否也有類似之情況呢,須先將周邊關閉才使用??

發表於: 2005/1/21 11:46
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#9
版主
版主


查看用戶資訊
你忘記將AD輸入腳功能關掉了。

#include <p30f4011.h>

int main (void)
{

int i ;

TRISBbits.TRISB7 = 0; // 設定RB7為output
ADPCFG=0x0080; // Set RB7 as Digital input mode
while(1)
{
PORTBbits.RB7 =0;
for(i=0;i<25000;i++);
PORTBbits.RB7 =1;
for(i=0;i<25000;i++);
}
}

發表於: 2005/1/21 9:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#8
中級會員
中級會員


查看用戶資訊

我後來找到問題了 設定的問題
Master Clear Enable 未開啟 .....

目前在在用C寫碰到問題如下:

#include <p30f4011.h>

int main (void)
{

int i ;

TRISBbits.TRISB7 = 0; // 設定RB7為output

while(1)
{
PORTBbits.RB7 =0;
for(i=0;i<25000;i++);
PORTBbits.RB7 =1;
}
return 0;
}

希望能使RB7達到亮--->延遲--->暗--->......--->亮

watch下看
TRISB----> 0xFF7F
LATB---> 0x0080
PORTB--->0x0000 (怪怪的!!)

編譯成功,但是,LED未能有此動作,請問程式有何問題??

麻煩幫我看一下,謝謝~~~

發表於: 2005/1/21 1:30
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#7
版主
版主


查看用戶資訊
兄弟,Microchip's AP009 demo board 就是使用 dsPIC30F4011 目前都沒有你所提到的問題,你可以到下載區下載它的電路圖跟範例程式,或著打 0800-717-718 電話討論。

發表於: 2005/1/10 15:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#6
高級會員
高級會員


查看用戶資訊
把你的設定資料PO出來讓大家參詳參詳

發表於: 2005/1/10 14:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#5
中級會員
中級會員


查看用戶資訊
熬了ㄧ個晚上 Debugger 問題解決了,原因為設定錯誤

多謝!!

不過 MCLR 的 Reset 功能還是沒進展,不知是否是設定錯誤

發表於: 2005/1/8 3:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#4
資深會員
資深會員


查看用戶資訊
4011,但是我的MPLAB IDE目前ICD2都是完全支援的..
我記得上次去台中上的課,DSPIC ADV PROG.也是用4011,好像沒什麼問題吧...

發表於: 2005/1/8 1:07
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#3
中級會員
中級會員


查看用戶資訊
目前用 dsPIC30F4011

發表於: 2005/1/8 0:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: ㄧ些使用 dsPIC 後的問題....
#2
資深會員
資深會員


查看用戶資訊
請問是那個型號呢?我目前使用6010,還沒有什麼大問題~~

發表於: 2005/1/8 0:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------