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

論壇索引


Board index » All Posts (coolyu)




Re: 請問dspic30f2010的rs232傳輸
#1
新會員
新會員


參照:

taih 寫道:

謝謝版主,問題已經解決,硬體線路有問題。
不過在請問版主chip接收的部分,為什麼我在終端機要連續keyin 4次 才會有反應呢?這跟我的初始化設定有關係嗎?

這是接收中斷副程式:

void _ISR _U1RXInterrupt(void)
{

if(U1RXREG==0x0031)
{running=1;}
if(U1RXREG==0x0032)
{running=0;}
IFS0bits.U1RXIF=0;
}


真巧我正好在查 U1RXREG 的資料,路過看到順便回答一下...


"Read the received data from UxRXREG. The act of reading UxRXREG will move the next word to the top of the receive FIFO and the PERR and FERR values will be updated."
以上片段轉載自datasheet:


您問題的原因如上所示, 您可以修改程式或是用內建的函數讀取,
這邊是我的 C code,我想您也換成C寫就可以了~~

unsigned char uart_temp[4];

uart_temp[0] = ReadUART1() ;
uart_temp[1] = ReadUART1() ;
uart_temp[2] = ReadUART1() ;
uart_temp[3] = ReadUART1() ;

發表於: 2009/2/25 17:55
頂部


Re: 請問版大,關於C語言的Bootloader
#2
新會員
新會員


版大,也請給小弟一份,謝謝!

coolyu99@gmail.com

發表於: 2008/11/15 1:07
頂部






:::

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

教育訓練中心

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