eeprom
Download
Skip this Video
Download Presentation
EEPROM

Loading in 2 Seconds...

play fullscreen
1 / 32

EEPROM - PowerPoint PPT Presentation


  • 94 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'EEPROM' - tashya-willis


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
slide2
下載
  • 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];
slide8
應用寫入副程式
  • /*
  • for(k=0; k<0x1000; k++)
  • {
  • EePROM_wword_1b(k, k);
  • }
  • */
slide9
刪除/*與*/(啟用應用寫入副程式)
  • for(k=0; k<0x1000; k++)
  • {
  • EePROM_wword_1b(k, k);
  • }
slide10
應用寫入副程式
  • for(k=0; k<0x1000; k++)
  • {
  • EePROM_wword_1b(k, k);
  • }
slide11
應用寫入副程式
  • for(k=0; k<0x1000; k++)
  • {
  • EePROM_wword_1b(k, 0xff-(k%256));
  • }
slide12
應用寫入副程式存中文字型
  • for(k=0; k<216; k++)
  • {
  • EePROM_wword_1b(k,name[k]);
  • }
slide13
應用寫入副程式存中文字型
  • for(k=0; k<216; k++)
  • {
  • EePROM_wword_1b(k,name[k]);
  • }

0000

中文字型

1000

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

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

英文字型

slide18
檢查英文字型是否加入
  • 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 );
  • }
  • }
slide19
下載
  • 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));
  • }
  • }
slide21
刪除//,修改紅字為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);
slide22
下載
  • 4619-lcm-text-chinese.rar
slide23
顯示學號姓名程式
  • 在該程式資料夾中加入eerom.c檔案
  • 在該程式資料夾中加入eerom.h檔案
slide26
write_lcm_data(font[ascii][j]); //write text
  • write_lcm_data(EePROM_rword_1b(0x1000+ascii*5+j) );
  • 0x1000+ascii*5+j
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 lcm data name data 72 j
去除write_lcm_data(name[data*72+j]);
  • 改為
  • write_lcm_data(EePROM_rword_1b(0x1000+data*72+j) );
font c
改完之後刪除font.c檔案
  • 改完之後刪除font.c檔案
  • 刪除name[216]={ }
  • 仍能正常顯示