Eeprom
This presentation is the property of its rightful owner.
Sponsored Links
1 / 32

EEPROM PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on
  • Presentation posted in: General

EEPROM. 下載. eerom-key led.rar. eerom.c 相關副程式. oid EePROM_INIT(void); // EEPROM 24LC256 初始化 void EePROM_chip_select(unsigned long,unsigned char); // set control_byte "read/write" unsigned char EePROM_read_1byte(void); // read_1byte

Download Presentation

EEPROM

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Eeprom

EEPROM


Eeprom

下載

  • eerom-key led.rar


Eerom c

eerom.c相關副程式

  • oid EePROM_INIT(void); // EEPROM 24LC256 初始化

  • void EePROM_chip_select(unsigned long,unsigned char); // set control_byte "read/write"

  • unsigned char EePROM_read_1byte(void); // read_1byte

  • unsigned char EePROM_write_startaddr(unsigned long); // write control_byte

  • unsigned char EePROM_write_1byte(unsigned char); // write_1byte

  • unsigned char EePROM_ack(void); // ack

  • void EePROM_S(void); // start signal

  • void EePROM_P(void); // stop signal


1 byte eeprom

寫入1 byte至EEPROM

  • EePROM_wword_1b(k,data[k]);

  • K:address

  • Data:data[k]


Eeprom 1 byte

由EEPROM讀取1 byte

  • EePROM_rword_1b(i)

  • i:address

  • Return:data


Eeprom1

應用讀取EEPROM副程式

  • for(i=0; i<0x1000; i++)

  • {

  • while (getkey() == 0xff );

  • // {

  • // key = (char)getkey();

  • // switch(key){

  • // case

  • // }

  • P9OUT = numTAB[ EePROM_rword_1b(i)%16];

  • P7OUT = numTAB[ (EePROM_rword_1b(i)/16)%16];

  • for(k=0; k<2000; k++);

  • while (getkey() != 0xff );

  • }

  • }


Eeprom led

顯示讀取EEPROM資料到LED

  • P9OUT = numTAB[ EePROM_rword_1b(i)%16];

  • P7OUT = numTAB[ (EePROM_rword_1b(i)/16)%16];


Eeprom

應用寫入副程式

  • /*

  • for(k=0; k<0x1000; k++)

  • {

  • EePROM_wword_1b(k, k);

  • }

  • */


Eeprom

刪除/*與*/(啟用應用寫入副程式)

  • for(k=0; k<0x1000; k++)

  • {

  • EePROM_wword_1b(k, k);

  • }


Eeprom

應用寫入副程式

  • for(k=0; k<0x1000; k++)

  • {

  • EePROM_wword_1b(k, k);

  • }


Eeprom

應用寫入副程式

  • for(k=0; k<0x1000; k++)

  • {

  • EePROM_wword_1b(k, 0xff-(k%256));

  • }


Eeprom

應用寫入副程式存中文字型

  • for(k=0; k<216; k++)

  • {

  • EePROM_wword_1b(k,name[k]);

  • }


Eeprom

應用寫入副程式存中文字型

  • for(k=0; k<216; k++)

  • {

  • EePROM_wword_1b(k,name[k]);

  • }

0000

中文字型

1000


Eeprom

應用寫入副程式存英文字型

0000

  • int n;

  • for(n=0; n<0x50; n++)

  • for(k=0; k<5; k++)

  • {

  • EePROM_wword_1b(0x1000+n*5+k,font[n][k]);

  • }

中文字型

1000

英文字型


Eeprom

將中文字型加入


Eeprom

將英文字型加入


Eeprom

檢查


Eeprom

檢查英文字型是否加入

  • for(i=0; i<0x1000; i++)

  • {

  • while (getkey() == 0xff );

  • P9OUT = numTAB[ EePROM_rword_1b(0x1000+i)%16];

  • P7OUT = numTAB[ (EePROM_rword_1b(0x1000+i)/16)%16];

  • for(k=0; k<2000; k++);

  • while (getkey() != 0xff );

  • }

  • }


Eeprom

下載

  • eeprom-show-lcm.rar


0x216

刪除0x216(修改英文顯示)

  • void one_text(char ascii)

  • {

  • char j;

  • write_lcm_data(0x00);

  • for(j=0;j<5;j++) //display一字 8x5

  • {

  • write_lcm_data(EePROM_rword_1b(0x1000+0x216+ascii*5+j));

  • }

  • }


Eeprom

刪除//,修改紅字為6(顯示數字)

  • //write_one_text(1,1, 0xd);

  • //write_one_text(2,2, 0xd);

  • //write_one_text(3,3, 0xd);

  • //write_one_text(4,4, 0xd);

  • //write_one_text(5,5, 0xd);

  • //write_one_text(6,6, 0xd);

  • write_one_chinese(0,0,0);

  • write_one_chinese(0,1,1);

  • write_one_chinese(0,2,2);


Eeprom

下載

  • 4619-lcm-text-chinese.rar


Eeprom

顯示學號姓名程式

  • 在該程式資料夾中加入eerom.c檔案

  • 在該程式資料夾中加入eerom.h檔案


Eeprom

在main檔案開頭加入


Eeprom

從這裡開始是改你的顯示學號姓名副程式


Eeprom

  • write_lcm_data(font[ascii][j]); //write text

  • write_lcm_data(EePROM_rword_1b(0x1000+ascii*5+j) );

  • 0x1000+ascii*5+j


One text

修改one_text副程式


Write lcm data font ascii j

去除write_lcm_data(font[ascii][j]);

  • for(j=0;j<5;j++) //display一字 8x5

  • {

  • //read text data=font[字的位置][第一筆資料],字的位置=page[第幾頁][第幾個字]

  • write_lcm_data(font[ascii][j]); //write text

  • write_lcm_data(EePROM_rword_1b(0x1000+ascii*5+j) ); }


Write one chinese

修改write_one_chinese副程式


Write lcm data name data 72 j

去除write_lcm_data(name[data*72+j]);

  • 改為

  • write_lcm_data(EePROM_rword_1b(0x1000+data*72+j) );


Port 5

初始化port 5


Font c

改完之後刪除font.c檔案

  • 改完之後刪除font.c檔案

  • 刪除name[216]={ }

  • 仍能正常顯示


  • Login