Re: 關於16F676 內含 EEPROM????
|
||||
---|---|---|---|---|
資深會員
|
素醬子呦 ? 讓偶好好酌模酌模 消化一下嚕;
好難耶?? 頭壳不輪轉啦 !! 哈..哈... 3Q,謝謝啦!大鍋....
發表於: 2008/10/8 2:02
|
|||
|
Re: 關於16F676 內含 EEPROM????
|
||||
---|---|---|---|---|
版主
|
鴨先生,
這個你就錯了,這不是宣告,也不會每次開機時會把使用者存入的值, 給覆蓋過去了。
[color=ff0000] org 0x2100 ; Set EEDATA location at 0x00
以上的程式經 Assembler 後會在 EEPROM 的位址 0x2100 產生一組 ROM Data 的 Table,該Table 會以 Hex 檔的方式存在。所以燒錄時就會將此資料燒到 EEPROM 裡,這時開機就會有初始參數可以使用。以後修改 EEPROM 的Table 後,在開機也是你最後所修改的值而不再會是程式的原始設定值。
發表於: 2008/10/7 8:17
|
|||
|
Re: 關於16F676 內含 EEPROM????
|
||||
---|---|---|---|---|
資深會員
|
3Q...Ryang 版主!
可是好像不是偶要的....我再詳細說明一下嚕!!! 偶在設計一個 Flat TV lifts , 基本上就是控制一個DC Motor up and down, 所以 EEPROM 裡面要存幾個資料... Position_temp -->目前位置; Position_Memory -->使用者儲存位置; Current_H--->Motor 最大電流;;(防止過載). Current_L--->Motor 最小電流; 問題是? 出廠時 ,Current_H,Current_L,要預先放入一個值, 例如Current_H=200, Current_L=50. 那第一次開機時可以Load進入程式, 讓使用者來控制DC Motor up and down, 使用者再用校正鍵存入新的值. 如果用宣告, 那每次開機不是會把使用者存入的值, 給覆蓋過去了? 所以想如何出廠時,預先放入一個出廠值在EEPROM裡面. 3Q lor...
發表於: 2008/10/7 3:08
|
|||
|
Re: 關於16F676 內含 EEPROM????
|
||||
---|---|---|---|---|
版主
|
可以的。
1. 使用 Hi-Tech PICC 用_ _ EEPROM_DATA ( ) 得方式宣告,
//**********************************
2. 使用組語宣告:
;************* Declare EEPROM Data Byte ********************
發表於: 2008/10/2 13:24
|
|||
|
關於16F676 內含 EEPROM????
|
||||
---|---|---|---|---|
資深會員
|
Dear All;
請教是否可以在燒錄16F676PIC時, 放入一些預設值到EEPROM去? 就是在開機時, 程式可以去EEPROM 把預設值拿出來用呢? 3Q lor .....
發表於: 2008/10/2 5:49
|
|||
|