• 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讀字串問題
#3
新會員
新會員


查看用戶資訊
板主大大:
對啊~~我就是用RB0外部中斷來作Software RX
RB0一中斷..我就用軟體UART去讀RB0...

發表於: 2005/4/4 15:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232讀字串問題
#2
版主
版主


查看用戶資訊
RB0 中斷裡讀取 UART 的資料,感覺起來架構上就怪怪的。
PIC18F458 本就有獨立的 UART 可以做 RXD 的中斷接收,
看不出來 INT0 的中斷與 UART 有何關係,除非你利用 INT0 來做 Software UART 的接收。

發表於: 2005/4/4 14:35
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


RS232讀字串問題
#1
新會員
新會員


查看用戶資訊
請問各位大大...
我是使用pic18f458..
我用RB0軟體UART讀入資料....
本來以為沒問題..因為用電腦輸入我鍵盤敲的字都會出現
後來用VB寫一個送一整組字串的...
buffer讀到的只有第一個字元是對的./_\.後面全是亂碼.
想請較各位大大怎麼會這樣./_\...
以下是我RB0中斷讀入RX的副程式..
#pragma interrupt Interrupt
void Interrupt(void)
{
if (INTCONbits.INT0IF == 1) //RB0 Occur Interrupt
{
INTCONbits.INT0IF =0;
sw_uart_buffer[sw_count]=ReadUART();
sw_count++;
if (sw_count==80)//Buffer size 80 character
{sw_count=0;} //Ring Buffer
}
}
#pragma code

發表於: 2005/4/4 10:44
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... ]

教育訓練中心

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