Re: 怪問題PIC24F64GA004燒錄不進去?
|
||||
---|---|---|---|---|
新會員
|
感謝Ryang的提示,找了半天原來是MCLR的問題,
不知是怎樣的問題接上10k仍會讓MCLR獨立運作時一樣會被拉LOW, 所以後來把他短路了=_=,因此要燒錄時就換成10k, 運作時就把他直接接到Vdd,XD不過很感謝! 終於找到問題點了, 花了我兩天的假期測出來的問題點>_<! 好感動~~~~
發表於: 2009/2/9 8:37
|
|||
|
Re: 怪問題PIC24F64GA004燒錄不進去?
|
||||
---|---|---|---|---|
新會員
|
Project->Build Configuration->Release
Ryang你應該是指這個吧!再燒錄時的確是這樣設定,但仍無效! 在選單中選擇Debugger->Select Tools與Programmer->Select Programmer 兩個僅能選擇一個ICD2,因此在燒錄時,選擇的同時,軟體也會提示要重新Build,並自動更改成Release,但我的問題還是沒解決,好像程式是寫在ICD2中而不是外部的pic24f中,但外部pic24f不接,Connect又連不到? 感覺就是好怪啊!
發表於: 2009/2/6 16:20
|
|||
|
Re: 怪問題PIC24F64GA004燒錄不進去?
|
||||
---|---|---|---|---|
版主
|
MPLAB IDE 主選項下有一個 Bebug/Release 的選項,如果不要用ICD2 進行 Debug 的話就要選 Release 後重新 Build All 後燒錄,這樣才可以 Stand Alone 執行。
發表於: 2009/2/6 16:03
|
|||
|
怪問題PIC24F64GA004燒錄不進去?
|
||||
---|---|---|---|---|
新會員
|
下面是燒錄後的訊息,很好燒錄完動作正常。
Connecting to MPLAB ICD 2 ...Connected Setting Vdd source to target Target Device PIC24FJ64GA004 found, revision = Rev 0x3003 ...Reading ICD Product ID Running ICD Self Test ...Passed MPLAB ICD 2 Ready Programming Target... ...Validating configuration fields ...Erasing Part ...Programming Program Memory (0x0 - 0x97F) Verifying... ...Program Memory ...Verify Succeeded ...Programming Configuration Bits .. Config Memory ...Programming succeeded 06-Feb-2009, 15:38:07 可是問題來了,當我把IC與ICD2分離時(就是像網路線那個接頭),IC居然就沒動作了=_=.......然後再插回去又可以動作, 不過若把USB斷掉、這時ICD2 POWER燈熄滅時,程式就完全不見了。 重複好幾次燒錄測試都是這樣的問題, 我是不是忘記設定什麼了嗎? PS:Configuration Bits Set為FRCPLL 這還需要外部電路輔助嗎=_=應該不用吧? /**Configuration Bits Set....**/ _CONFIG2( 0x81AF); //CW2 _CONFIG1( 0x777F); //CW1 程式都運作正常,在模擬階段一切都依需求。 =_=就只差把程式燒進去這個步驟了~~~~~ 麻煩各位大爺客官們,幫小弟我解決問題吧! 補充:其他參數設定 /**時脈設定**/ void init_system() { OSCCON=0x1120; CLKDIV=0x0000; OSCTUN=0x0000; } /**Timer1參數設定**/ void init_timer1() { IPC0bits.T1IP=2; IFS0bits.T1IF=0; IEC0bits.T1IE=1; PR1=80; TMR1=0; //T1CON=0x8000; } /**IO參數設定**/ void init_IO() { TRISA=0x048F; TRISB=0xFFBF; TRISC=0x0003; //TRISC=0x000f; } /**ADC參數設定**/ void init_ADC() { AD1PCFG=0xFFBA; AD1CSSL=0x0000; AD1CON1=0x00E0; AD1CON3=0x1F02; AD1CON2=0x0000; AD1CHS=0x0000; AD1CON1bits.ADON=1;// Last ON when parameter set done. } /**外部中斷參數設定**/ void init_int() { RPINR0bits.INT1R=4;//int1 pin RPINR1bits.INT2R=5;//int2 pin IPC5bits.INT1IP=3; IPC7bits.INT2IP=7;//prority 2(7 is highest) INTCON2=0x0000;//bit 1 is INT1 posedge(0) or negedge(1) IFS1bits.INT1IF=0;//flag clear IFS1bits.INT2IF=0;//flag clear IEC1bits.INT1IE=1;//enable interrupt IEC1bits.INT2IE=1;//enable interrupt } int main() { int temp=0; count=0; init_system(); OSCCONbits.IOLOCK=0; // init_timer1(); init_IO(); init_int(); init_ADC(); while(1) { .....其他程式碼........ 附加檔案中是燒錄過程的畫面!我這樣操作有問題嗎? Attach file: Link only for registered users
發表於: 2009/2/6 15:59
|
|||
|