• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::

論壇索引


Board index » All Posts (linuxrd007)




軟體SPI程式
#1
新會員
新會員


各位前輩:

之前使用PIC16F819以及MCP2515還有MCP2551做了CAN實驗,並使用SPI做MCU與CAN Controller之間的通訊介面。現在我要用ARM做MCU去控制CAN,但ARM卻沒有SPI介面可用,我問過我老師,他說網路上有提供軟體SPI程式,要我參考它的作法再轉成ARM就可以了。可是我怎都找不到??

有沒有人有軟體SPI可以提供給我的,很急~!

請寄至: linuxrd007@yahoo.com.tw

謝謝各位~!

發表於: 2006/5/15 14:26
頂部


請問 Hitect PICC18 可以燒錄PIC16F877嗎?
#2
新會員
新會員


請問各位:

Hitect PICC18 可以燒錄PIC16F877嗎?

我的實驗室只有 PICC18,但我卻是用PIC16F877。

請各位幫我解答~ 謝謝~!

發表於: 2006/3/30 20:43
頂部


PIC16F877燒錄的問題~!!
#3
新會員
新會員


各位前輩您好:
以下是燒錄時出現的訊號

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC16F877 found, revision = b8
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Erasing Target Device...
...Erase Succeeded
MPLAB ICD 2 Ready
Blank Checking...
...Program Memory
.. Config Memory
...EEPROM
...User ID Memory
...Blank Check Passed
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x776)
Verifying...
...Program Memory
會出現以下錯誤訊號,不知為何?
ICD0161: Verify failed (MemType = Program, Address = 0x1, Expected Val = 0x18A, Val Read = 0x0)
MPLAB ICD 2 Ready

之前用都好好的,怎突然出現這錯誤訊號?

發表於: 2006/3/13 16:43
頂部


Re: 在中斷服務程式中~~什麼叫做PASS
#4
新會員
新會員


了解~謝謝您的回答 ^^

發表於: 2006/2/3 13:38
頂部


在中斷服務程式中~~什麼叫做PASS
#5
新會員
新會員


請教各位

今天去找老師談我寫的程式,他說我的中斷服務程式要跳出來時的PASS沒有接好~~!!

PASS是什麼意思?

發表於: 2006/1/19 11:41
頂部


菜鳥的問題
#6
新會員
新會員


請問

#DEFINE XYZ 0X20



XYZ EQU 0X20


的差別?

發表於: 2006/1/3 11:43
頂部


Re: 求救~! 誰能提供SPI的組語程式
#7
新會員
新會員


謝謝 Ryang 的指點,我現在有點概念了 ^^

發表於: 2006/1/3 11:35
頂部


DEBUG 的問題
#8
新會員
新會員


好奇怪喔~~ 明明程式OK卻一直出現以下的錯誤訊號:

Error[108] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 23 : Illegal character (
)

Error[148] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 184 : Expanded source line exceeded 200 characters.

Error[108] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 219 : Illegal character (,)

Error[128] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 318 : Missing argument(s)

到底是哪裡有錯呢?

發表於: 2006/1/3 11:32
頂部


求救~! 誰能提供SPI的組語程式
#9
新會員
新會員


請教各位前輩:

我用PIC16F819的SPI去控制MCP2510的CAN功能,卻一直弄不出來。真的很心煩。希望各位提供SPI的組合語言給我參考。

謝謝各位

發表於: 2005/12/23 20:57
頂部


為何會出現這些訊息
#10
新會員
新會員


各位前輩

我暫存器的初始設定降子不知道對不對,請指點我。謝謝各位。

ORG 00H ; processor reset vector
NOP
NOP
GOTO INITIAL
ORG 04H ; Intentry
RETFIE
INITIAL ; Initial
BANKSEL OPTION_REG ; set option reg.
MOVLW B'10000000' ; PORTB pull-ups are disable
MOVWF OPTION_REG

MOVLW B'00100011' ; set PORTA 5,1,0
MOVWF TRISA ; data direction of PORTA

MOVLW B'11000011' ; set PORTB 7,6,1
MOVWF TRISB ; data direction of PORTB

;MOVLW B'00001000' ; set SSPIE, SSP enable reg.
;MOVWF PIE1 ; peripheral interrupt enable reg.

MOVLW B'01110100' ; set 8MHz & freq. stable mode
MOVWF OSCCON ; OSC control reg.

;MOVLW B'11000000' ; set SMP & CKE
;MOVWF SSPSTAT ; SPI data input sample phase bit
; and SPI clock edge
MOVLW 07H ; 00000111
MOVWF ADCON1 ; set PCFG<3:0> to 0111, C/R=0/0

BANKSEL PORTA
CLRF PORTA ; clear all pin
CLRF PORTB

CLRF INTCON ; ensure all interrupt are disable
; interrupt control reg.
;MOVLW B'01000000' ; set PEIE
;MOVWF INTCON ; peripheral interrupt enable bit

;MOVLW B'00001000' ; set SSPIF, SSP interrupt flag
;MOVWF PIR1 ; peripheral interrupt request reg.

;MOVLW B'00110000' ; set SSPEN & CKP
MOVLW B'00100000' ; set SSPEN
MOVWF SSPCON ; Initial SPI control reg.


都會出現以下的訊息,雖然無關燒錄~~但總希望能完美。

Clean: Deleting intermediary and output files.
Clean: Deleted file "CAN_TEST_1.err".
Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.cod".
Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.hex".
Clean: Deleted file "CAN_TEST_1.lst".
Clean: Deleted file "D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F819 "CAN_TEST_1.asm" /l"CAN_TEST_1.lst" /e"CAN_TEST_1.err"
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 54 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 57 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 60 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 66 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 72 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 104 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 108 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 200 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 213 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 224 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 235 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 247 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.ASM 254 : Register in operand not in bank 0. Ensure that bank bits are correct.
Loaded D:\MPLAB\PIC16F819\CAN_TEST\CAN_TEST_1.COD.
BUILD SUCCEEDED: Fri Dec 09 11:22:41 2005


發表於: 2005/12/9 11:41
頂部



(1) 2 »



:::

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

教育訓練中心

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