• 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: rs232接收的問題一問
#6
新會員
新會員


查看用戶資訊
RCON =80 -> IPEN=1
INTCON =E0 -> GIEH , GIEL
INTCON2=8E -> RBPU disable,
INTEDG3 (rizing) , TMR0IP , INT3IP
INTCON3=B0 -> INT2IP,INT3IE,INT2IE
PIE1=21 -> RC1IE,TMR1IE
PIE3=EA -> SSP2IE,BCL2IE,RC2IE,TMR4IE,CCP4IE
IPR1=21 -> RC1IP,TMR1IP
IPR3=E2 -> SSP2IP,BCL2IP,RC2IP,CCP4IP


功能好多 , 同時TMR4 指定為 Low priority , 好複雜 !

發表於: 2007/10/24 13:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: rs232接收的問題一問
#5
高級會員
高級會員


查看用戶資訊
鮑率為9600

發表於: 2007/10/22 14:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: rs232接收的問題一問
#4
初級會員
初級會員


查看用戶資訊
鮑率的設定值為何呢?

發表於: 2007/10/22 10:42
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: rs232接收的問題一問
#3
高級會員
高級會員


查看用戶資訊
後來解決了因osc用的不同、device用的電壓只有3v所以無沒用到20MHz 的osc。
後來又遇到一個問題、之前人寫的debug mode 將資料用一個io 摸擬uart傳送到電腦的資料我換了之前、在電腦前看就都亂掉了。
原本是使用timer2我後來改到timer4因為型態才相同。
osc 4Mhz 使用4倍頻所以是16MHz
以下是一些相關的設定、有大大能幫我看一下嗎
18f6680換18f8622
void Dputc(uw8 cc)
{
uw16 i;

Dbit = 0x0001;
Ddata = 0xF007 | ((uw16)cc<<4);//61447

T4CONbits.TMR4ON = 1;
i = 0;
while(T4CONbits.TMR4ON) {
if (i>RSWAIT_T2MS) break;
_nop();
i++;
}

}
if (PIR3bits.TMR4IF) { // Timer4 Interrupt for DBG (9600 bps).

PIR3bits.TMR4IF = 0;
TMR4 = 0;

if (Ddata & Dbit) PORTEbits.RE7 = 1;
else PORTEbits.RE7 = 0;

Dbit <<= 1;

if (Dbit==0x8000) T4CONbits.TMR4ON = 0;

}
TRISE = 0x10;
INTCON = 0xE0;
INTCON2 = 0x8E;
INTCON3 = 0xB0;
PIR1 = 0x0;
PIR2 = 0x0;
PIR3 = 0x0;
PIE1 = 0x21;
PIE2 = 0x0;
PIE3 = 0xEA;
IPR1 = 0x21;
IPR2 = 0x0;
IPR3 = 0xE2;
RCON = 0x80;

發表於: 2007/10/17 16:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: rs232接收的問題一問
#2
新會員
新會員


查看用戶資訊

發表於: 2007/10/2 12:46
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


rs232接收的問題一問
#1
高級會員
高級會員


查看用戶資訊
我原本寫的是用18f6680後來改成18f8622在應用uart2的時候產生了問題
我傳送了48byte的ff給是收到的第一個byte是ff後面的2~48都變成了fe到底發生了什麼事情了

發表於: 2007/10/1 17:52
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... ]

教育訓練中心

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