• 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: RS232與終端機溝通不起來,請求幫忙
#18
版主
版主


查看用戶資訊

發表於: 2008/8/14 15:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#17
高級會員
高級會員


查看用戶資訊
我的PIC終於和PC對話了 ... 結論都不是出在程式上的問題,而是出在線材上 ... 因為現在市面上筆電都沒有 Com Port 了,所以我使用 USB 轉 RS-232 的那種轉接線來讓 PC 與 PIC 連結,可是一直都過不來,就算有時候會通也都是亂碼 ... 於是請教了老師之後才說用桌上型的 Com Port 看看 ... 結果很順利,數據一直丟進來 ... 這實在是讓我這一個禮拜的過程很想去撞牆 ... 後來又試了 GPRS 送數據給 PIC 在出來 送到 終端機 也OK了 .... 真是殘念呀 ~

PS : 再來要進入下一個階段,用 PIC 另外模擬 一組 RS-232
埠出來 ~ 有人有好的建議嘛 ?

發表於: 2008/8/13 18:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#16
高級會員
高級會員


查看用戶資訊
請問以下這段錯誤訊息是什麼意思

MP2COD 4.00, COFF to COD File Converter
Copyright (c) 2005 Microchip Technology Inc.
Error - Source file 'C:\Documents and Settings\Chen Yang Li\My Documents\RS232\rs232.c' name exceeds file format maximum of 62 characters.
Errors : 1

Loaded C:\Documents and Settings\Chen Yang Li\My Documents\RS232\RS232.cof.
BUILD SUCCEEDED: Wed Aug 13 12:15:57 2008

最後BUILD不是說成功了嗎 ? 為什麼上面會跑出 ERROR ?

發表於: 2008/8/13 12:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#15
高級會員
高級會員


查看用戶資訊
問個問題,APP001實驗板上 JP1 & JP2 有跳線帽的話此時震盪器是 16Mhz 對不對 ? DataSheet上面寫的 ~ 那另外一顆3200K 的石英震盪器是幹麻的 ? 正常使用是跑哪個頻率呀 ?

發表於: 2008/8/13 10:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#14
新會員
新會員


查看用戶資訊
之前學弟有遇過此問題....傳輸資料錯誤
後面發現問題....是
1.Configurations Bits 內的使用Oscillator 設錯
2.根據Oscillator不同...BAUD算法不同(datasheet有)
修改後...就正常ㄌ

發表於: 2008/8/13 2:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#13
高級會員
高級會員


查看用戶資訊
在書店看到一本曾百由寫的書,正在研究中 ...

發表於: 2008/8/12 21:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#12
高級會員
高級會員


查看用戶資訊
Setting 如下
HS
C
Disable
Enable
2.5V
Disable Controlled by SWDTEN bit
1:128
RC1
Enable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable
Disable

發表於: 2008/8/12 15:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#11
資深會員
資深會員


查看用戶資訊
看了你的程式碼,我只想問一句....

「你的configuration bits 到底有沒有設對啊!?」

發表於: 2008/8/12 14:38
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#10
高級會員
高級會員


查看用戶資訊
吼 ~ 好急阿,有沒有誰可以提供一下基本的PIC透過RS232跟終端機可以互傳的基本程式給我修改阿...試了一個多禮拜兩邊都無法溝通...太扯了 = =

發表於: 2008/8/12 12:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: RS232與終端機溝通不起來,請求幫忙
#9
高級會員
高級會員


查看用戶資訊
另外一提,終端機這邊從鍵盤敲出去的資料是什麼東西 ? ASCII碼 ? 我從鍵盤敲 U 他是跑 十進位085還是
16進位 55,阿不管我打什麼PIC裡面的暫存器一個字元的資料長度是8位元對不對 ? 那假設終端機丟十進位出來好了,丟0傳0丟8傳8丟5傳5這樣回到終端機....想當然爾是組不起來085的ASCII碼進而顯示出 U 我這樣說對不對 ?

發表於: 2008/8/12 10:32
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... ]

教育訓練中心

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