Re: Explorer16上dsPIC33F與PIC18F4450通訊問題
|
||||
---|---|---|---|---|
版主
|
參照:
那在Slave端寫入SPIBUF時 同樣的這也是沒看書的結果,如果你把 PIC24 Family Reference Manual 裡的 SPI 章節(第23章) 看過後你就不會問此問題了。因為你還不了解 SPI 的基本動作,建議你先看了以後再問這樣比較會有概念的。 http://ww1.microchip.com/downloads/en/DeviceDoc/39699b.pdf http://www.microchip.com/wwwproducts/ ... es.aspx?dDocName=en024807
發表於: 2009/9/15 10:35
|
|||
|
Re: Explorer16上dsPIC33F與PIC18F4450通訊問題
|
||||
---|---|---|---|---|
版主
|
Explorer-16 有使用手冊及線路圖,如果你事先沒去看就直接玩 Explorer-16 就是在混水里抓魚-- 瞎摸,花了一堆的時間摸,不如先把使用手冊好好的讀一遍。
http://ww1.microchip.com/downloads/en ... User%20Guide%2051589a.pdf 使用手冊裡對 S2 滑動開關的說明。撥到 PIM 位置,PIM 的 Reset 才會被放開,否則就會使用 on-board 的 MCU, 不過此 on-board MCU 目前是空在那的。 4.2.1 Processor Support The Explorer 16 board has been designed to accommodate both permanently mounted (i.e., soldered on) and detachable PIM processors. Slider switch, S2, allows the user to choose which processor to use. This makes it possible for the Explorer 16 board to support most 3V, 16-bit, pin compatible microcontrollers with appropriate PIMs. PIMs are visually indexed for proper installation. The PIM is always installed with the notched corner mark on the corner of the PIM board oriented to the upper left corner. Current revisions of the board do not have a permanently mounted microcontroller in U1. In order for the board to work, therefore, S2 must always be left in the “PIM” position. In future versions with a permanently mounted PIC24 device at U1, setting S2 in the “PIC” position will enable the on-board device and disable the PIM socket. J7 選擇 ICD 除錯要對 PIC18F4550 還是 PIM (燒錄與除錯) 4.2.6 ICD Connector An MPLAB ICD 2 module can be connected by way of the modular connector (JP1) for low-cost debugging. The ICD connector utilizes port pins, RB6 and RB7 of the microcontroller, for in-circuit debugging. Jumper J7 decides the terminus of the ICD 2 connector. If the jumper is set to the “PIC24” side, JP1 communicates directly with RB6/RB7 of the PIM or on-board device (determined by S2). If the jumper is set to the “F4450” side, JP1 communicates with the on-board PIC18LF4550 USB device.
發表於: 2009/9/15 10:16
|
|||
|
Re: Explorer16上dsPIC33F與PIC18F4450通訊問題
|
||||
---|---|---|---|---|
初級會員
|
後來偶然間發現了
版子上的PIC18可以在Release mode燒錄後 J7 Jumper不需跳到F4550上也可獨立運作 但版子上的PIM模組即使以Release mode燒錄後 J7 Jumper一定要跳到PIC24上才可運作 ============================= 但又有了新問題想要請教 由於我想讓diPIC33F當MASTER, PIC18當SLAVE 由dsPIC33F傳一個BYTE給PIC18後 PIC18把收到的BYTE處理過後再回傳給dsPIC33F 我的問題是資料的收發都是由主控端控制的 那在Slave端寫入SPIBUF時 資料會主動送給MASTER嗎? 還是一定要MASTER送一個空白的BYTE把PIC18要送的值收回來? 對於SPI同時發一個BYTE也會收進一個BYTE的原理用法不是很清楚 麻煩請指教 謝謝
發表於: 2009/9/14 23:07
|
|||
|
Explorer16上dsPIC33F與PIC18F4450通訊問題
|
||||
---|---|---|---|---|
初級會員
|
Explorer16 的Manual裡有提到有USB Connectivity的功能
可利用版子上的PIC18F4550對電腦做USB的傳輸 我把版子上的J7 Jumper調到F4550對PIC18做DEMO程式的燒錄 的確可以對電腦使用USB連接做串列傳輸 所以我想進一步的在dsPIC33F與PIC18之間用SPI做資料傳輸 來達到dsPIC33F<-->(SPI)<-->PIC18F4550<-->(USB)<-->PC的傳輸 但我寫好了dsPIC33F端的程式用Release Mode燒錄後 dsPIC33F就可以不靠ICD2獨立RUN上面的程式 然後再將J7 Jumper跳至F4550時 dsPIC33F就沒動作了.......... 請問這塊版子上面的這兩顆IC可以都用Release Mode燒錄後 同時運作嗎? 還是Jumper跳至哪顆IC就只能跑那顆IC的程式呢? 如果一次只能RUN一顆IC的話 這樣設計的意義好像怪怪的 請給予指教 謝謝
發表於: 2009/9/14 17:45
|
|||
|