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


Browsing this Thread:   1 Anonymous Users






Re: 我開啟DEMO程式卻出現??
#2
版主
版主


查看用戶資訊
確定在 MPLAB IDE 下沒有重複開啟同一Project?
如果沒有的話,就就先關閉所有的 Project 後在重新建立一個新的 Project 看看。

發表於: 2008/7/24 14:33
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


我開啟DEMO程式卻出現??
#1
初級會員
初級會員


查看用戶資訊
我有一塊DM300027實驗版
裡面有三個範例!
一個是給30F系列使用!
我有30F4012 IC
去跑這範例:
#include "p30F2010.h"
// the above include path may be different for each user. If a compile
// time error appears then check the path for the file above and edit
// the include statement above.

#define XTFREQ 7372800 //On-board Crystal frequency
#define PLLMODE 16 //On-chip PLL setting
#define FCY XTFREQ*PLLMODE/4 //Instruction Cycle Frequency

#define BAUDRATE 9600
#define BRGVAL ((FCY/BAUDRATE)/16)-1


int main(void)
{

ADPCFG = 0xFF; //Make analog pins digital

LATE = 0x0;
TRISE = 0xF0; //Configure LED pins as output

TMR1 = 0; // clear timer 1
PR1 = 0x7270; // interrupt every 250ms
IFS0bits.T1IF = 0; // clr interrupt flag
IEC0bits.T1IE = 1; // set interrupt enable bit
T1CON = 0x8030; // Fosc/4, 1:256 prescale, start TMR1


TRISF = 0xC;
U1BRG = BRGVAL;
U1MODE = 0x8000; // Reset UART to 8-n-1, alt pins, and enable
U1STA = 0x0440; // Reset status register and enable TX & RX


_U1RXIF=0; // Clear UART RX Interrupt Flag


while(1)
{
int a;

while (_U1RXIF==0); // Wait and receive one Character
a = U1RXREG;

while(!U1STAbits.TRMT); // Echo back received character with quotes
U1TXREG = '"';

while(!U1STAbits.TRMT);
U1TXREG = a;

while(!U1STAbits.TRMT);
U1TXREG = '"';

while(!U1STAbits.TRMT);
U1TXREG = ' ';

_U1RXIF=0; // Clear UART RX Interrupt Flag

}
return 0;
}


void __attribute__((interrupt, no_auto_psv)) _T1Interrupt(void)
{
IFS0bits.T1IF = 0; // clear interrupt flag

LATE ^= 0xF; //Toggle LED's
}


開專案有一個檔名LED.mcp
但是都出現 LED.mcp is already open.
為何??

發表於: 2008/7/23 22:35
剛摸PIC的電源工程師
PIC12F508
[font=Impact]剛摸PIC的電源工程師
PIC12F508
[/font]
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... ]

教育訓練中心

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