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

論壇索引


Board index » All Posts




PIC10LF322 ROM使用
新會員
新會員


請問,我現在有需求要將資料放在ROM裡面,每次開機後先讀取資料,進行模式判斷後再跑主程式,且會在IC運作中更改放在ROM裡面的資料並儲存供下次使用,資料預計是0~9的數字給主程式判斷使用哪個模式,那麼PIC10LF322 的Program Memory Flash (words)及High Endurance Flash (bytes),哪個適合我使用呢?要怎麼使用?
還是需要有EEPROM的IC才能這樣使用呢?

發表於: 2021/1/7 9:45
頂部


Re: XC8T v1.0 教材的程式編譯顯示錯誤
新會員
新會員


謝謝板主,已解決。

發表於: 2021/1/7 9:34
頂部


空中教室課程講義與影片
初級會員
初級會員


請問,

沒有報名空中教室課程(錯過時間且時間不允許),
有辦法下載講義並自行在家利用額外的時間觀看影片?

謝謝。

發表於: 2021/1/7 9:13
頂部


Re: DEVICE IS NOT SUPPORTED BY CURRENTLY LOADED LIBRARY
管理員
管理員


你好! ATSAME51N19A 為ARM base Cortex-M4的MCU, 需使用Harmony v3進行開發, 無法使用MCC來開發.

發表於: 2021/1/6 12:26
頂部


DEVICE IS NOT SUPPORTED BY CURRENTLY LOADED LIBRARY
初級會員
初級會員


DEVICE :ATSAME51N19A
以下載網站上所有的LIBRARY,仍然錯誤:

MCC ERROR MSG:

15:46:44.867 資訊: Fetching list of available libraries.
15:46:53.620 資訊: Download Complete: C:\Users\User\.mcc\mcc_libraries.xml
15:46:54.229 INFO: Start MCC
15:46:54.309 INFO: Core v5.0.2 loaded.
15:46:54.326 INFO: Libraries defined in the configuration:
15:46:58.931 WARNING: The project's device is not supported by the currently loaded libraries. All library versions are available for download on the MCC website. www.microchip.com/mcc
15:46:58.972 INFO: Stop MCC
15:46:58.972 INFO: Core v5.0.2 unloaded.

發表於: 2021/1/4 15:51
best regards,
Anthony
頂部


Re: XC8T v1.0 教材的程式編譯顯示錯誤
版主
版主


抱歉,今天剛回到辦公室上班。還是要祝您新的一年萬事如意。

關於你的問題無法用 XC8 編譯成功? 這是 XC8 內部設定使用 XC90 或 XC99 (C Standard) 的選項問題。
因為這份教材有些年份了,當初也只有 C89/C90 的標準可選用,所以此教材裡的練習是選用 C90 的 Standard。

請到此專案的 "Project Properties - 16F1939_ROM_Pointer_Lab3" 裡選擇使用 C90 的 Standard.
如貼圖所示:

Attach file:



jpg  擷取.JPG (40.83 KB)
16_5ff27b89df41e.jpg 902X286 px

發表於: 2021/1/4 10:20
頂部


XC8T v1.0 教材的程式編譯顯示錯誤
新會員
新會員


如題,在研究XC8T v1.0 教材裡的PIC16F1939 FSRH:FSRL ROM指標練習時,將教材裡的檔案開啟直接進行編譯,卻發生以下錯誤訊息,請問是我哪邊沒有設定好嗎?使用MPLAB X IDE v5.35,再請幫忙解答,thx!

1. 教材內容,如下
------------------------------------------------
#include

// ************ 設定 PIC16F1937 Configuration Bits ******

// PIC16F1939 Configuration Bit Settings

// 'C' source line config statements

#include

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

// CONFIG1
#pragma config FOSC = ECH // Oscillator Selection (ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin)
#pragma config WDTE = ON // Watchdog Timer Enable (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled)
#pragma config MCLRE = ON // MCLR Pin Function Select (MCLR/VPP pin function is MCLR)
#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config CPD = OFF // Data Memory Code Protection (Data memory code protection is disabled)
#pragma config BOREN = ON // Brown-out Reset Enable (Brown-out Reset enabled)
#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
#pragma config IESO = ON // Internal/External Switchover (Internal/External Switchover mode is enabled)
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is enabled)

// CONFIG2
#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off)
#pragma config VCAPEN = OFF // Voltage Regulator Capacitor Enable (All VCAP pin functionality is disabled)
#pragma config PLLEN = ON // PLL Enable (4x PLL enabled)
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
#pragma config LVP = ON // Low-Voltage Programming Enable (Low-voltage programming enabled)

const unsigned char Lookup_Table[ ] = {0xA0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 80, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 80, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 80, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
0xAA, 0xAB};

unsigned char Input_Buffer[320] @0x21;
const unsigned char *near ROMPTR = Lookup_Table;
unsigned char *near RAMPTR = Input_Buffer; // PTR 指標位址設在 Access Memory
near unsigned int j; // 變數 j 放在 Access Memory

void main(void)
{
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;

while (1);
}
--------------------------------------------------------

2. 錯誤訊息,如下
--------------------------------------------------------
Program Lookup Table FSR.c:54:32: error: expected ';' after top level declarator
unsigned char Input_Buffer[320] @0x21;
^
;
Program Lookup Table FSR.c:55:26: error: expected ';' after top level declarator
const unsigned char *near ROMPTR = Lookup_Table;
^
;
Program Lookup Table FSR.c:56:16: error: redefinition of 'near' with a different type: 'unsigned char *' vs 'const unsigned char *'
unsigned char *near RAMPTR = Input_Buffer; // PTR }]b Access Memory
^
Program Lookup Table FSR.c:55:22: note: previous definition is here
const unsigned char *near ROMPTR = Lookup_Table;
^
Program Lookup Table FSR.c:56:20: error: expected ';' after top level declarator
unsigned char *near RAMPTR = Input_Buffer; // PTR }]b Access Memory
^
;
Program Lookup Table FSR.c:57:1: error: unknown type name 'near'
near unsigned int j; // j b Access Memory
^
Program Lookup Table FSR.c:57:6: error: expected identifier or '('
near unsigned int j; // j b Access Memory
^
Program Lookup Table FSR.c:61:10: error: use of undeclared identifier 'j'
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;
^
Program Lookup Table FSR.c:61:17: error: use of undeclared identifier 'j'
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;
^
Program Lookup Table FSR.c:61:27: error: use of undeclared identifier 'j'
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;
^
Program Lookup Table FSR.c:61:32: error: use of undeclared identifier 'RAMPTR'
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;
^
Program Lookup Table FSR.c:61:44: error: use of undeclared identifier 'ROMPTR'
for (j = 0; j <= 302; j++)*RAMPTR++ = *ROMPTR++;
^
11 errors generated.

發表於: 2020/12/31 14:26
頂部


Re: 請問SST26VF032B的動作?
資深會員
資深會員


Dear Ryang :

1. 那EEPROM容量是不夠.
2. 我已解決了,已可以讀寫了.

謝謝.

發表於: 2020/12/30 17:14
頂部


Re: 請問SST26VF032B的動作?
版主
版主


25LC1024 , 25LC512, 25LC256 這些容量應該夠吧?

https://www.microchip.com/wwwproducts/en/25LC1024

發表於: 2020/12/29 10:07
頂部


Re: 請問SST26VF032B的動作?
資深會員
資深會員


Dear Ryang :

請問 :
Page Program 是寫 1~256 Bytes,那我先將Rom清除,
我再用一個Address一個Data的方式寫入, 這樣可以?

謝謝.

發表於: 2020/12/28 17:42
頂部



« 1 ... 203 204 205 (206) 207 208 209 ... 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... ]

教育訓練中心

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