Browsing this Thread:
1 Anonymous Users
|
16F873A 的 MSPI 程式
|
|
新會員
Joined
: 2005/12/22 12:18 最後登入時間
: 2006/6/29 10:59
Group:
註冊會員
Level : 1 HP : 0 / 2 MP : 1 / 149 EXP : 10
|
您好,小弟最近寫了一個SPI的程式,可是我一直量不到SPI相關PIN OUT的 波形(SCK/SDO), 下面附上我的SPI code 請板大幫忙看一下,謝謝
banksel TRISC movlw 0x10 ;let PORT C bit 4(SI as input others as output) movwf TRISC
banksel SSPSTAT bcf SSPSTAT,7 bcf SSPSTAT,6 ;data transfer when falling edge
banksel SSPCON clrf SSPBUF ;clear SSP BUFFER movlw 0x31 ;no collision, no overflow, Enable SPI, High Level when Idel, Clock=OSC/32 movwf SSPCON bsf SSPCON,5 banksel PIE1 clrf PIE1 ;disable all peripheral int
banksel INTCON clrf INTCON ;disable all interrupts
發表於: 2005/12/22 12:23
|
|
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.