欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標(biāo)題: 這是我寫的對Arduino單片機(jī)Eeprom進(jìn)行讀寫的源程序 [打印本頁]

作者: wyyojbk    時間: 2018-2-15 10:15
標(biāo)題: 這是我寫的對Arduino單片機(jī)Eeprom進(jìn)行讀寫的源程序
這是我寫的對Arduino單片機(jī)Eeprom進(jìn)行讀寫的源程序,
可以為Arduino內(nèi)存不夠提供一種可行的解決方案,
希望能給大家一些幫助。

Arduino源程序如下:
  1. #include <EEPROM.h>
  2. int address = 0;
  3. byte value;

  4. void setup()
  5. {
  6.   // put your setup code here, to run once:
  7.       Serial.begin(9600);
  8. }

  9. void loop()
  10. {
  11.   // put your main code here, to run repeatedly:
  12.   
  13.   for(int i=0;i<512;i++)
  14.   {
  15.     EEPROM.write(address,i);address++;
  16.     }
  17.    address=0 ;
  18.     for(int i=0;i<512;i++)
  19.   {
  20.     value=EEPROM.read(address);
  21.       Serial.print(address);
  22.       Serial.print("\t");
  23.      Serial.print(value, DEC);
  24.      Serial.println();
  25.       delay(100);address++;

  26.     }

  27.     for (int i = 0; i < 512; i++)
  28.     EEPROM.write(i, 0);
  29.        address=0 ;
  30.     for(int i=0;i<512;i++)
  31.   {
  32.     value=EEPROM.read(address);
  33.       Serial.print(address);
  34.       Serial.print("\t");
  35.      Serial.print(value, DEC);
  36.      Serial.println();
  37.       delay(1000);address++;

  38.     }
  39.     address=0 ;

  40. }
復(fù)制代碼

所有資料51hei提供下載:
EEPROMxieduchu.zip (624 Bytes, 下載次數(shù): 15)



作者: luoyinbazi    時間: 2018-2-15 22:27
謝謝啦,學(xué)習(xí)了,新年快樂
作者: zhy123    時間: 2018-3-29 23:40

感謝分享!我正在學(xué)習(xí)!
作者: beauty123    時間: 2020-4-26 14:41
剛學(xué)到這,有點(diǎn)看不懂,可以注釋一下嗎




歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1