Browsing this Thread:
1 Anonymous Users
|
Baud rate問題
|
|
新會員
Joined
: 2008/9/23 8:50 最後登入時間
: 2008/12/17 17:47
Group:
註冊會員
Level : 2 HP : 0 / 46 MP : 5 / 2180 EXP : 86
|
我使用pic18f1220 IC設定Baud rate 250K,想要單純data
的接收,再接收地方設定斷點看data是否正確,但是以下程式
的設定方式,RCIF都為0,代表都沒接收到DATA,請問設定對嗎?
哪裡有問題?或著有更好的方法可以建議呢?
#include "p18f1220.h" void main(void){ TXSTA=0x04; RCSTA=0x90; BAUDCTLbits.BRG16=1;//16 bits baud rate SPBRGH=0x00; SPBRG=0x02; //BAUD RATE=250k T2CON=0x04;
while(1){ if(PIR1bits.RCIF) rdata=RCREG; } }
****************pic新手請多指教***************
發表於: 2008/9/30 9:21
|
|
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.