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


Browsing this Thread:   1 Anonymous Users




« 1 (2)


Re: PIC16F877A UART
#9
版主
版主


查看用戶資訊
我認為是終端機的設定。之前有不少網友建議不少的 UART HEX Code 的監看程式,搜尋一下。

或找示波器勾一下 TxD 的訊號ㄚ。

發表於: 2010/1/11 18:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#8
高級會員
高級會員


查看用戶資訊
我在MPLAB SIM下看到也是正常的...
但是實在想不出來板子還是終端機上有什麼問題...
囧了囧了...

發表於: 2010/1/11 17:36
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#7
版主
版主


查看用戶資訊
我把你的程式用 MPLAB SIM 跑過一次,在 Output Window 的 UART I/O 視窗下所傳送出去的 a 字元很正常,每 Reset 後執行就只又送出一個 a 而已,並沒有多送啊!

發表於: 2010/1/11 17:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#6
高級會員
高級會員


查看用戶資訊
是的...我一直在重複檢查看自己有沒有做了什麼蠢事...
不過好像還沒發現-..-!


list    p=16f877a
    
include"p16f877.inc"
    
__CONFIG _XT_OSC&_WDT_OFF&_BODEN_OFF

    org    0x0
    call    uart_init

    
goto    main

main
:
    
call    send_data
    
goto    $

send_data:
    
banksel    PIR1
    btfsc    PIR1
,TXIF
    
goto    get_data
    
goto    send_data
get_data
:
    
banksel    TXREG
    movlw    
'a'
    
movwf    TXREG
    
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
uart_init:
    
banksel    TRISC
    bcf        TRISC
,6
    bsf     TRISC
,7
    movlw    D
'25'
    
movwf    SPBRG
    bsf        TXSTA
,BRGH
    bcf        TXSTA
,SYNC
    bsf        TXSTA
,TXEN
    bcf        TXSTA
,TX9
    banksel    RCSTA
    bsf        RCSTA
,CREN
    bsf        RCSTA
,SPEN
    
return

    
end

發表於: 2010/1/11 16:54

Edited by xuan_root on 2010年01月11日 17:11:54
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#5
版主
版主


查看用戶資訊
關好了,那還會再重複傳送A?

發表於: 2010/1/11 16:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#4
高級會員
高級會員


查看用戶資訊
我把狗關在籠子裡了...><!

發表於: 2010/1/11 16:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#3
版主
版主


查看用戶資訊
參照:

wireless 寫道:
狗沒顧好.

形容的真妙有貼切!

發表於: 2010/1/11 16:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC16F877A UART
#2
初級會員
初級會員


查看用戶資訊
狗沒顧好.

發表於: 2010/1/11 16:15
Wireless Design House
http://www.wireless.idv.tw
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC16F877A UART
#1
高級會員
高級會員


查看用戶資訊
厚顏無恥又來問了...搞了一個早上...

請問為什麼用UART非同步模式跟PC 終端機連結時

我只想送出一個A...但是終端機畫面上他會不停的出現AAAAAAAAAAAAAAAA.......><!
main:
    
call    send_data
    
goto    $

send_data:
    
banksel    PIR1
    btfsc    PIR1
,TXIF
    
goto    get_data
    
goto    send_data
get_data
:
    
banksel    TXREG
    movlw    
'a'
    
movwf    TXREG
    
return

發表於: 2010/1/11 14:42

Edited by Ryang on 2010年01月11日 16:19:05
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... ]

教育訓練中心

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