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

論壇索引


Board index » All Posts (davidneal)




Re: 燒錄問題...LF跟F系列
#1
新會員
新會員


小弟之前有燒錄LF的Chip,外加電壓2.8V燒,一樣可以燒,蠻不錯的

發表於: 2005/11/7 16:03
頂部


請問18F4550的USB interrupt如何使用??
#2
新會員
新會員


Dear All,
USB Democode裡面我加入了Timer interrupt的程式
結果發現如果USB在通訊的時候,發生中斷的話,PC端會秀出無法識別的裝置,仔細一看,PIR2有USBIF這個bit,那代表usb也可以用interrupt的方式來做囉??
請問有哪位大大知道USB interrupt如何使用??




;-------------------------------------------------------------------
void main(void)
{
InitializeSystem();
TimerInital();
OpenLCD( ) ;
putrsLCD("PIC18F4550 Test") ;
while(1)
{

USBTasks(); // USB Tasks
ProcessIO(); // See user\user.c & .h


}//end while
}//end main
;-------------------------------------------------------------------
#pragma code isrhighcode = 0x0008

void isr_high_direct(void)
{
_asm //begin in-line assembly

goto isr_high //go to isr_high function
_endasm //end in-line assembly
}

#pragma code
#pragma interrupt isr_high
void isr_high(void)
{
INTCONbits.TMR0IF=0;
WriteTimer0(0x16);
if (TCOUNT>=100)
{
TCOUNT = 0;
mLED_4_Toggle();
}
else
TCOUNT = TCOUNT+1;
TCOUNT++;
}
#pragma code

;-------------------------------------------------------------------
void TimerInital(void)
{

TCOUNT = 0;
RCONbits.IPEN=1;

INTCON2bits.TMR0IP=1;
WriteTimer0(0x16);
OpenTimer0(TIMER_INT_ON & T0_8BIT & T0_SOURCE_INT & T0_PS_1_256);
INTCONbits.PEIE=1;
INTCONbits.GIE=1;

;-------------------------------------------------------------------

發表於: 2005/9/23 11:35
頂部


Re: ICD2 秀出ICD0083: Target not in debug mode, unable to perform operation
#3
新會員
新會員


謝謝tony大大的意見
6.電源確定有接....
7.我昨晚接了16f877來試,功能正常....
8.我會去研究一下....

後來又換了一個30f2010來試...還是掛點

發表於: 2004/11/15 8:02
頂部


Re: ICD2 秀出ICD0083: Target not in debug mode, unable to perform operation
#4
新會員
新會員


謝謝大大指點...
剛剛小弟拆開來看,發現沒有r25和r36電阻,所以我想我的ICD2應該還蠻新的.. ,唉~~難道是我的icd2壞了嗎?????????還是哪裡有設錯呢??請知道的大大指點一下

發表於: 2004/11/13 14:59
頂部


Re: ICD2 秀出ICD0083: Target not in debug mode, unable to perform operation
#5
新會員
新會員


看到原廠網站Dspicdem 28pin starter demo user's guide,
文件裡頭是使用7.37M oscillator,Oscillator mode----XT w/PLL 4x
就想說照做試試~買了一個比較接近的....7.2M,但還是結果一樣....

發表於: 2004/11/13 8:32
頂部


ICD2 秀出ICD0083: Target not in debug mode, unable to perform operation
#6
新會員
新會員


各位大大好:
我現在用ICD2 debug 30f2010,秀出以下訊息...

Setting Vdd source to MPLAB ICD 2
Target Device dsPIC30F2010 found, revision = mm3 a0
...Reading ICD Product ID
Running ICD Self Test
...Passed
...Download Operating System Succeeded
MPLAB ICD 2 Ready
Resetting Target
MPLAB ICD 2 Ready
ICDWarn0015: Program memory has changed since last program operation? Continue with Debug operation?
Stepping Target

ICD0083: Target not in debug mode, unable to perform operation
MPLAB ICD 2 Ready
Running ICD Self Test
...Passed

看了一些user guide後~想說是我的Configuration Bits設定有問題

我把
1.Clock switching and monitor---disable
2.Oscillator mode----primary oscillator
3.Oscillator mode----XT

硬體
1.一個20M Oscillator接在osc1和osc2並且接兩個20p電容接地
2.emuc和emud接了
3.nmclr接電阻再接vdd,電阻用過4.7k,10k,22k都不行

找了好久找不到問題........

發表於: 2004/11/12 23:32
頂部


Re: 使用asm30,build後出現的錯誤訊息.....
#7
新會員
新會員


謝謝大大指點,現在趕快去看Spec

發表於: 2004/11/11 13:31
頂部


Re: 使用asm30,build後出現的錯誤訊息.....
#8
新會員
新會員


謝謝jwean大大~
問題已經解決了,不知大大是怎麼知道如何解決,還是有什麼文件可以參考????


剛學Dspic的菜鳥問~~~

發表於: 2004/11/11 0:08
頂部


Re: 使用asm30,build後出現的錯誤訊息.....
#9
新會員
新會員


謝謝大大,加入P30f2010.gld以後已經解決,但又秀出奇怪的問題....
C:\Program Files\MPLAB IDE\dsPIC_Tools\support\gld\p30f2010.gld:1335: undefined symbol `__reset' referenced in expression

BUILD FAILED: Wed Nov 10 11:55:24 2004

到指定的地方一看..是指在這地方底下,就是在p30f2010.gld的最後一行
/*=========================================================================
**end of SFR definitions required in Data Space
*========================================================================*/

可是這裡面什麼也沒有.....????????

唉~~不知道的東西還真多.......麻煩大大了.........

發表於: 2004/11/10 12:05
頂部


使用asm30,build後出現的錯誤訊息.....
#10
新會員
新會員


各位大大好:
我用asm30寫完程式並且build後,發現fail並且秀出以下字串...

Skipping link step. The project contains no linker script.

請問一下這是說我要設定linker script 的path嗎???
可是我看build option裡面Linker-script path這選項不能讓我選path???真怪.....我使用的是30f2010..... 希望會的大大能指導一下



pic新手


發表於: 2004/11/10 9:42
頂部



(1) 2 »



:::

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

教育訓練中心

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