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

論壇索引


Board index » All Posts (blue_sky82)




Re: PIC18F4685 UART Baud rate
#1
初級會員
初級會員


謝謝大家的回覆

因為搭配硬體設計,Baud rate設定 19200

發表於: 2020/6/17 22:14
頂部


PIC18F4685 UART Baud rate
#2
初級會員
初級會員


FOSC = 8.000 MHz
Baud rate設定 9600, 19200, 57600設定通訊正常
設定為115200時,可接收發送

但是接收到的數值發送出來,值是錯誤的

想請問,是不是哪邊沒注意到



OSCCON = 0x60;
OSCTUNEbits.PLLEN = 1;


// USART Initialize
OpenUSART( USART_TX_INT_OFF // Set TXSTA Reg. = 0b11111111 ( PIE1bits.TXIE = 1 )
& USART_RX_INT_OFF // Set RCSTA Reg. = 0b10010000 ( PIE1bits.RCIE = 1 )
& USART_ASYNCH_MODE // Asynchronous Mode( TXASTAbits.SYNC = 0 )
& USART_EIGHT_BIT // 8-bit transmit/receive( TXSTAbits.TX9 = 0 ; RCSTAbits.RX9 = 0 )
& USART_CONT_RX // Continuous reception( RCSTAbits.CREN = 1 )
& USART_BRGH_HIGH // High baud rate( TXSTAbits.BRGH = 1 )
, BaudRate_GEN); // SPBRG

Attach file:



jpg  (0.00 KB)


發表於: 2020/6/16 9:49
頂部


Re: TCPIP 相關問題
初級會員
初級會員



發表於: 2015/11/11 9:51
頂部



(1) 2 3 4 »



:::

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

教育訓練中心

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