• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::

論壇索引


Board index » All Posts




傳輸錯誤 Q__Q
資深會員
資深會員


昨天在測試兩顆pic18f4320用spi通訊
如果只傳輸一個位元組的數值時都沒問題
但若要傳輸16位元資料就會出錯
但我控制MCP42010時都沒問題
他也是用SPI傳輸16位元資料(8位元組態資料,8位元控制資料)
我想請問有試過的前輩
用SPI通訊時有哪幾個暫存器必須設定?
我只有設定兩個
master PIC :
MOVLW B'10000000' ;SMP = 1,CKE = 0
MOVWF SSPSTAT ;
MOVLW B'00100010' ;CKP = 0
MOVWF SSPCON1 ;

slave PIC:
MOVLW B'00000000' ;設定為SLAVE,CKE=0
MOVWF SSPSTAT ;
MOVLW B'00100101' ;預設/SS不使用
;改為I/O,CKP=1
MOVWF SSPCON1 ;

請問這個設定有哪裡出錯
有範例可以參考嗎
謝謝

發表於: 2004/8/31 11:00
頂部


Re: PIC18的書上市了
資深會員
資深會員


這本寫的實在很難花錢買。
=========================

哈哈~~~ 有同感說
還以為只有我那樣覺得而已勒

所以那本書買回來到現在 都還放在書架上 懶的動他

發表於: 2004/8/31 9:02
頂部


Re: 共用震盪訊號最多可以並聯幾顆PIC ?
高級會員
高級會員


我想 , 這很難去說明到底可以接幾個 , 一般說來在規格上會標明每個IO所需要的標準信號準位 , 至於你的振盪器用的是什麼規格 , 線路LAYOUT的方式都會造成不同的干擾或阻抗 , 我想你還是測一下 , 以線路上每一顆IC側的準位為準吧!

發表於: 2004/8/30 16:32
頂部


Re: 18f458 tmr0
高級會員
高級會員


16MHZ = 250nS per instruction cycle , if Prescaler value = X , then 250nS*X = time of TMR0+1 , 1S/(250nS*X) = Y , Y = TIMER count value , So , TMR0 not long enough to count , Maybe use Timer1, or use the other byte to count TIMER0 interrupt ,

2 . sure , you can use them at the same time , Why not !
in PIC18F , you can set high priority and Low priority for each interrupt source ,

發表於: 2004/8/30 16:22
頂部


共用震盪訊號最多可以並聯幾顆PIC ?
資深會員
資深會員


所有PIC都是18F4320

我現在用一顆震盪器給主PIC
(4PIN石英震盪器,從CLKI進)
再把震盪訊號從CLKO(頻率/4)輸出給其他的週邊PIC

我想請問一下
CLKO最多可以同時接幾個PIC啊?
我怕接太多會使得震盪訊號太弱而產生錯誤...

發表於: 2004/8/30 15:23
頂部


Re: ex738
初級會員
初級會員


Thanks.I see the display in HyperTerm at 16MHz.

發表於: 2004/8/30 14:33
頂部


18f458 tmr0
初級會員
初級會員


I use 18f458@16MHz,I want the tmr0 to interrupt 1 times per second,how to set register tmr0 and the prescale value?May i enable timer0 and timer1 interrupt at the same time?

發表於: 2004/8/30 14:29
頂部


Re: 組合語言搭配C語言的記憶體配置問題!
高級會員
高級會員


Section 'secName' can not fit the section. Section 'secName' length='0xHHHH'.
A section which has not been assigned to a memory in the linker command file can not be allocated. Use the -m <mapfile> switch to generate an error map file. The error map will show the sections which were allocated prior to the error. More memory must be made available by adding a CODEPAGE, SHAREBANK, or DATABANK directive, or by removing the PROTECTED attribute, or the number of input sections must be reduced.

發表於: 2004/8/30 10:48
頂部


Re: C compiler 問題?
高級會員
高級會員


沒錯 , 就是指AN833的PDF說明 , 你總得先了解AN833到底用了那些資源來完成的 , 那些是要依照你的環境需求修改的 ,

發表於: 2004/8/30 10:36
頂部


Re: 請問有關MPLINK的問題?
版主
版主


既然用了 ORG 的虛指令強定程式的位址,就表示你的組合語言是屬於單一原始程式的架構,就不能用 MPLINK 來排定執行的位址。
如果你是採用Re-Locaatable的多原始程式的語法,就需改用 CODE 的程式節區宣告並交由 MPLINK 幫你排定最後的執行位址。
程式與變數都有特定的編排方式,有關此詳細的介紹請參考右邊"教材及講義"內的workshop中的MPASM 一天講義。

發表於: 2004/8/30 8:49
頂部



« 1 ... 7436 7437 7438 (7439) 7440 7441 7442 ... 7525 »



:::

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

教育訓練中心

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