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


Browsing this Thread:   1 Anonymous Users






Re: 33fj12mc201的timer1測試問題
#3
初級會員
初級會員


查看用戶資訊
^^多謝版大~~可以了

發表於: 2009/12/8 11:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 33fj12mc201的timer1測試問題
#2
版主
版主


查看用戶資訊
中斷函數宣告錯誤了,改一下:

void __attribute__((interrupt, no_auto_psv)) _T1Interrupt(void)

發表於: 2009/12/8 10:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


33fj12mc201的timer1測試問題
#1
初級會員
初級會員


查看用戶資訊
程式中RA0腳位為輸出timer1所中斷的時間週期但是RA0卻都一直維持在初值所設定的HIGH電位~請問有大大知道問題出在哪嘛?
#include <p33FJ12MC201.h>
_FGS (GSS_OFF & GCP_OFF& GWRP_OFF); _FOSCSEL(FNOSC_PRIPLL & IESO_OFF);
_FOSC (FCKSM_CSDCMD & OSCIOFNC_OFF & POSCMD_HS);
_FWDT(FWDTEN_OFF);
_FPOR(PWMPIN_ON & HPOL_ON & LPOL_OFF & FPWRT_PWR1);
_FICD ( JTAGEN_OFF & ICS_PGD1);

int main(void)
{
ADPCFG=0xffff;
TRISA = 0xfffe;
LATA = 0x0001;
IPC0bits.T1IP = 6;
IEC0bits.T1IE = 0;
T1CON = 0x8000;
PR1 = 2949;
while(1)
{
}
}
void __T1Interrupt(void)
{
PORTAbits.RA0 = ~PORTAbits.RA0 ;
IFS0bits.T1IF = 0;
}

發表於: 2009/12/5 11:25
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... ]

教育訓練中心

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