• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users




« 1 (2)


Re: 有關於printf函數 for MPLAB X IDE v5.5
#3
版主
版主


查看用戶資訊
接收速度可以跟的上傳送的速度嗎?
用示波器量一下,確定是否有輸出?
完整的字串最後還有一個 NULL Byte (0x00)。

發表於: 2021/11/14 21:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 有關於printf函數 for MPLAB X IDE v5.5
#2
初級會員
初級會員


查看用戶資訊
參照:

jonic wrote:
請問各位前輩
目前我想用printf()函數,傳送字串給UART
1.由於printf()函數是透過putch()函數傳送字元,所以我已經將putch指向UART
2.我有單獨使用putch('A'),UART可以正常接收到'A'
3.可是一但我用printf("Tx Success!")時UART沒有接收到資料

請問各位前輩,是我哪裡沒設定到呢?
謝謝!!


補充說明
如果我用unsigned char Input_Buffer[11]; // 宣告一個 11 Bytes RAM 的陣列
Input_Buffer[0]='T'
Input_Buffer[1]='x'
Input_Buffer[2]=' '
Input_Buffer[3]='S'
Input_Buffer[4]='u'
Input_Buffer[5]='c'
Input_Buffer[6]='c'
Input_Buffer[7]='e'
Input_Buffer[8]='s'
Input_Buffer[9]='s'
Input_Buffer[10]='!'
然後printf(Input_Buffer)就可正常傳送至UART

麻煩各位前輩幫忙看看,是我哪裡沒設定到呢?如果我能用printf("Tx Success!")
就可以送出資料的話,就方便多了

發表於: 2021/11/14 15:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


有關於printf函數 for MPLAB X IDE v5.5
#1
初級會員
初級會員


查看用戶資訊
請問各位前輩
目前我想用printf()函數,傳送字串給UART
1.由於printf()函數是透過putch()函數傳送字元,所以我已經將putch指向UART
2.我有單獨使用putch('A'),UART可以正常接收到'A'
3.可是一但我用printf("Tx Success!")時UART沒有接收到資料

請問各位前輩,是我哪裡沒設定到呢?
謝謝!!

發表於: 2021/11/13 18:45
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... ]

教育訓練中心

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