• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: dsPIC33FJ128MC708 的PORTB怪現象(Release時)
#2
新會員
新會員


查看用戶資訊
在datasheet 10.3的note中看到
In devices with two ADC modules, if the
corresponding PCFG bit in either
AD1PCFGH(L) and AD2PCFGH(L) is
cleared, the pin is configured as an analog
input.

才想到要再加一行
AD2PCFGL = 0xffff;

就解決了。

謝謝大家。

發表於: 2008/1/23 15:57
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


dsPIC33FJ128MC708 的PORTB怪現象(Release時)
#1
新會員
新會員


查看用戶資訊
我使用APP026-2作硬體平台使用REAL ICE做除錯與燒錄,用MPLAB IDE 與C30寫一個程式,本來用Debugger模式RUN很正常,後來用Programmer去燒一切都不對了,查了兩天然後寫了最簡單的程式:
我將RE0~4接到LED1~4,RB0~4接到S1~4,在Dubugger時,未按下SW前LED都亮,按下SW後對應的LED熄滅-正常;選Programmer後用Release重新編譯並Program後就變成不管怎麼按SW,LED都是微微亮著,
我看過版上為何燒錄出來的IC不會動他是PORTB沒設定為Digital,可是我有設呀,而且我原本的程式與PORTB[0:7]無關的部分都正常運作。
Please help me,是哪個Reg也要設定嗎?

以下是最簡化的測試程式程式碼(有確認過CLOCK、GLD檔):

#include <P33FJ128MC708.h>

int main ( void )
{
unsigned char longdata;

AD1PCFGH = 0xffff;
Nop( );
AD1PCFGL = 0xffff;
Nop( );
TRISB = 0xffff;
TRISE = 0xff00;
LATB = 0xffff;
LATE = 0xffff;
Nop();
while(1){
longdata = PORTB;
Nop();
PORTE = longdata;
Nop();
}
}

發表於: 2008/1/23 2:59
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... ]

教育訓練中心

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