• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   3 Anonymous Users






Re: 怪問題PIC24F64GA004燒錄不進去?
#5
新會員
新會員


查看用戶資訊
感謝Ryang的提示,找了半天原來是MCLR的問題,
不知是怎樣的問題接上10k仍會讓MCLR獨立運作時一樣會被拉LOW,
所以後來把他短路了=_=,因此要燒錄時就換成10k,
運作時就把他直接接到Vdd,XD不過很感謝!
終於找到問題點了,
花了我兩天的假期測出來的問題點>_<!
好感動~~~~

發表於: 2009/2/9 8:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 怪問題PIC24F64GA004燒錄不進去?
#4
版主
版主


查看用戶資訊
MCLR 腳有接10K ohm 電阻到Vdd?
參考一下Configuration 的設定,參考 H 檔的定義說明: (PIC24FJ64GA002)
_CONFIG2(IESO_OFF FNOSC_PRIPLL FCKSM_CSDCMD I2C1SEL_SEC POSCMOD_HS)
// HS mode with x4 PLL, I2C as pin15 (SCL) & pic14 (SDA)
_CONFIG1(JTAGEN_OFF GCP_OFF GWRP_OFF ICS_PGx1 FWDTEN_OFF)
// Debug with PGC1(pin5) & PGD1 (pin4) ; WDT OFF


config2 設定使用 HS-Mode Crystal。參考 H 檔後改一下 FRC。

還有 ICD2 不接Target IC 是不會動作的也會顯示找不到元件,ICD2 一定要接 Tatget 元件的。
程式一定要燒到PIC24F 後才會執行,ICD2 指示的通訊裝置而已,沒有接 PIC24 的話,ICD2 什麼也不是。

發表於: 2009/2/6 17:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 怪問題PIC24F64GA004燒錄不進去?
#3
新會員
新會員


查看用戶資訊
Project->Build Configuration->Release
Ryang你應該是指這個吧!再燒錄時的確是這樣設定,但仍無效!
在選單中選擇Debugger->Select Tools與Programmer->Select Programmer 兩個僅能選擇一個ICD2,因此在燒錄時,選擇的同時,軟體也會提示要重新Build,並自動更改成Release,但我的問題還是沒解決,好像程式是寫在ICD2中而不是外部的pic24f中,但外部pic24f不接,Connect又連不到?
感覺就是好怪啊!

發表於: 2009/2/6 16:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 怪問題PIC24F64GA004燒錄不進去?
#2
版主
版主


查看用戶資訊
MPLAB IDE 主選項下有一個 Bebug/Release 的選項,如果不要用ICD2 進行 Debug 的話就要選 Release 後重新 Build All 後燒錄,這樣才可以 Stand Alone 執行。

發表於: 2009/2/6 16:03
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


怪問題PIC24F64GA004燒錄不進去?
#1
新會員
新會員


查看用戶資訊
下面是燒錄後的訊息,很好燒錄完動作正常。

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
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... ]

教育訓練中心

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