spi mode 設定問題
|
||||
---|---|---|---|---|
中級會員
|
請教各位: 如何在Harmony 3 設定SPI MODE3: CPOL=1 CPHA=1
發表於: 2021/7/21 11:43
|
|||
|
讀寫 i2c csi 24c02 問題
|
||||
---|---|---|---|---|
中級會員
|
uint8_t EERD_BUF[16];
uint8_t TEST_DATA[16]; void Get_ AT24MAC402_MAC(uint8_t *MAC_BUF) { uint8_t SubAddr[0]; SubAddr[0] = 0xA0; SERCOM2_I2C_Write( 0xA0, SubAddr, 1); while(SERCOM2_I2C_IsBusy()); SERCOM2_I2C_Read(0xA0,MAC_BUF,16); while(SERCOM2_I2C_IsBusy()); __asm("nop"); //設定斷點程式有跑到這 查看EERD_BUF 都是0 } int main ( void ) { uint8_t i=0; for (i=0 ;i < 16 ; i++) { TEST_DATA[i]=i; // 初始化填入測試數據入 } SERCOM2_I2C_Write(0xA0,&TEST_DATA[0],16); while(SERCOM2_I2C_IsBusy()); __asm("nop"); //設定斷點程式有跑到這 Get_AT24MAC402_MAC (&EERD_BUF[0]); while ( true ) { /* Maintain state machines of all polled MPLAB Harmony modules. */ SYS_Tasks ( ); __asm("nop"); return ( EXIT_FAILURE ); } }
發表於: 2021/7/9 10:24
|
|||
|
Re: ATSAMC21J18A 編譯錯誤
|
||||
---|---|---|---|---|
中級會員
|
HI Ryang
感謝我在試試~~~~
發表於: 2021/7/6 11:00
|
|||
|
Re: [分享]ATSAME51J20A Curiosity Nano 學習記事
|
||||
---|---|---|---|---|
中級會員
|
真的很不錯,可以提供 ATSAMC21J18A 例程?
發表於: 2021/7/3 22:48
|
|||
|
ATSAMC21J18A 編譯錯誤
|
||||
---|---|---|---|---|
中級會員
|
請教各位有人遇過? 使用 Harmony 工具產生程式碼,為何編譯會有問題
我使用 MPLAB X IDE: V4.15 ,XC32: V2.50 /******************************************************************************* Main Source File Company: Microchip Technology Inc. File Name: main.c Summary: This file contains the "main" function for a project. Description: This file contains the "main" function for a project. The "main" function calls the "SYS_Initialize" function to initialize the state machines of all modules in the system *******************************************************************************/ // ***************************************************************************** // ***************************************************************************** // Section: Included Files // ***************************************************************************** // ***************************************************************************** #include #include #include #include "definitions.h" // SYS function prototypes // ***************************************************************************** // ***************************************************************************** // Section: Main Entry Point // ***************************************************************************** // ***************************************************************************** int main ( void ) { /* Initialize all modules */ SYS_Initialize ( NULL ); while ( true ) { /* Maintain state machines of all polled MPLAB Harmony modules. */ SYS_Tasks ( ); } /* Execution should not come here during normal operation */ return ( EXIT_FAILURE ); } /******************************************************************************* End of File */ [color=FF211E]make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make[1]: *** No rule to make target '.build-conf'. Stop. make[1]: Entering directory 'F:/ARM_SAM/My_Project/firmware/demo.X' make[1]: Leaving directory 'F:/ARM_SAM/My_Project/firmware/demo.X' nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 135ms) [/color]
發表於: 2021/7/3 18:47
|
|||
|
Re: 關於品項選用
|
||||
---|---|---|---|---|
中級會員
|
HI tonys
你給這個連結,無法輸入需求,要怎要操作 下載版要去哪捉 http://www.microchip.com/maps/Microcontroller.aspx[/quote] tonys wrote: 嗯,主持人新的IC會比較節省成本,我也有聽到,其實的確如此,除非有什麼特別的原因,否則可考慮新 PIC,不過 source code 可能要稍微修改一下。 Microchip 的 PIC 型號很多,到底換哪一顆,主持人應該只是舉個例子,如 16F84A 是 18-pin, 16F72 是 28-pin,並不適合直接代換,你應該還是找 18-pin 的,這樣硬體可以不改。 可以上 www.microchip.com 的 product 裡找一找,這是所有 18~20 pin 的: http://www.microchip.com/ParamChartSe ... &mid=10&lang=en&pageId=74 16F84A 可以換成 16F627A, 16F628A ,不過這些也很久了 現在應該還有更多選擇... 尤其一些條件如果可以稍為調整,例如不要 EEPROM,或者可以接受改用 20 或 14-pin...等等,又有更便宜的。 也可以利用選型工具,把需求填入,就會列出符合條件的 PIC,蠻好用的,這是線上版: (另外也有下載版) http://www.microchip.com/maps/Microcontroller.aspx[/quote]
發表於: 2021/6/29 16:54
|
|||
|
Re: PIC18F 週邊驅動程式庫 去哪單獨下載
|
||||
---|---|---|---|---|
中級會員
|
參照:
發表於: 2021/6/24 23:23
|
|||
|
Re: PIC18F 週邊驅動程式庫 去哪單獨下載
|
||||
---|---|---|---|---|
中級會員
|
hi Ryang
感謝快速回復,我使用PIC18F24K42這顆料,有沒有如 TI MSP430 有範例可以直接 下載Sample code ,這樣就不用透過 MCC 產生 Ryang wrote: 建議如果你是使用舊的PIC18Fxxxx 元件 (例: PIC18F4520) 因為沒有 MCC 的支援所以要得到周邊函數庫的支援就要使用 C18 或XC8 v1.34 的編譯器。有關MPLAB 個版本的軟體可以在底下的庫存檔案區找到: https://www.microchip.com/en-us/develo ... osystem-downloads-archive 建議使用新的元件,新元件的周邊現都可以用 MCC 來做視覺化的周邊設定。相關參考教材可以在教育訓練光碟下找到: 8-Bits MCU 相關課程 --> PIC101 X IDE & MCC& XC8 基礎課程 MCC201 v3.0x MPLABC® Code Configurator CIP102v2.00 進階獨立式週邊(Adv. CIP)的應用[/quote]
發表於: 2021/6/24 13:11
|
|||
|
PIC18F 週邊驅動程式庫 去哪單獨下載
|
||||
---|---|---|---|---|
中級會員
|
XC8版本1.35之後刪除PIC18週邊驅動程式庫及其相關的標頭檔和文檔不再隨此編譯器一起提供
去那可以下載週邊驅動程式庫及其相關的標頭檔和文檔
發表於: 2021/6/23 0:18
|
|||
|