- 詳細資訊
商品說明
產品特點與規格
- 板載8P晶片座,安裝AT24C256晶片;
- 排針供電,板載電源指示燈;
- 板載I2C通訊所需的上拉電阻;
- 所有管腳均引出並標注,地址輸入和寫保護管腳直接可以跳線設置;
- PCB板子尺寸:36.5(mm)x12(mm)
- 容量:256K I2C接口
發貨清單
AT24C256 存儲模組 x 1塊
原廠技術文件
http://playground.arduino.cc/Code/I2CEEPROM
Arduino 範例
/*
* Use the I2C bus with EEPROM 24LC64
* Sketch: eeprom.pde
*
* Author: hkhijhe
* Date: 01/10/2010
*
*
*/
#include <Wire.h> //I2C library
void i2c_eeprom_write_byte( int deviceaddress, unsigned int eeaddress, byte data ) {
int rdata = data;
Wire.beginTransmission(deviceaddress);
Wire.send((int)(eeaddress >> 8)); // MSB
Wire.send((int)(eeaddress & 0xFF)); // LSB
Wire.send(rdata);
Wire.endTransmission();
}
// WARNING: address is a page address, 6-bit end will wrap around
// also, data can be maximum of about 30 bytes, because the Wire library has a buffer of 32 bytes
void i2c_eeprom_write_page( int deviceaddress, unsigned int eeaddresspage, byte* data, byte length ) {
Wire.beginTransmission(deviceaddress);
Wire.send((int)(eeaddresspage >> 8)); // MSB
Wire.send((int)(eeaddresspage & 0xFF)); // LSB
byte c;
for ( c = 0; c < length; c++)
Wire.send(data[c]);
Wire.endTransmission();
}
byte i2c_eeprom_read_byte( int deviceaddress, unsigned int eeaddress ) {
byte rdata = 0xFF;
Wire.beginTransmission(deviceaddress);
Wire.send((int)(eeaddress >> 8)); // MSB
Wire.send((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,1);
if (Wire.available()) rdata = Wire.receive();
return rdata;
}
// maybe let's not read more than 30 or 32 bytes at a time!
void i2c_eeprom_read_buffer( int deviceaddress, unsigned int eeaddress, byte *buffer, int length ) {
Wire.beginTransmission(deviceaddress);
Wire.send((int)(eeaddress >> 8)); // MSB
Wire.send((int)(eeaddress & 0xFF)); // LSB
Wire.endTransmission();
Wire.requestFrom(deviceaddress,length);
int c = 0;
for ( c = 0; c < length; c++ )
if (Wire.available()) buffer[c] = Wire.receive();
}
void setup()
{
char somedata[] = "this is data from the eeprom"; // data to write
Wire.begin(); // initialise the connection
Serial.begin(9600);
i2c_eeprom_write_page(0x50, 0, (byte *)somedata, sizeof(somedata)); // write to EEPROM
delay(10); //add a small delay
Serial.println("Memory written");
}
void loop()
{
int addr=0; //first address
byte b = i2c_eeprom_read_byte(0x50, 0); // access the first address from the memory
while (b!=0)
{
Serial.print((char)b); //print content to serial port
addr++; //increase address
b = i2c_eeprom_read_byte(0x50, addr); //access an address from the memory
}
Serial.println(" ");
delay(2000);
}
相關商品
-
微動開關 TACK-SW 4P 6x6x5mm(H) 10個一包
0 滿分 5 分NT$40 未稅微動開關 TACK-SW 10P 一包
尺寸:6mm x 6mm x 5.0mm -
GY-31 TCS3200 顏色感測器 顏色識別模組 顏色感應傳感器
0 滿分 5 分GY-31 TCS3200 顏色感測器 由三原色感應原理可知,如果知道構成各種顏色的三原色的值,就能夠知道所測試物體的顏色。對於TCS3200來說,當選定一個顏色濾波器時,它只允許某種特定的原色通過,阻止其他原色的通過。例如:當選擇紅色濾波器時,入射光中只有紅色可以通過,藍色和綠色都被阻止,這樣就可以得到紅色光的光強。
NT$238NT$200 未稅 -
PL2303TA USB轉串口模组傳輸線 USB轉 TTL/RS232
0 滿分 5 分此款為USB-TTL 轉換線,內部使用PL-2303TA轉換芯片,線長1M。可以用於各種設備開發,調試,燒錄,升級,刷機等等。不死機,不死串口,性能穩定,這也是定制這款轉換線的目的。該線與市場上面一般的轉換線,天壤之別。為研發方便,省折騰。研發人員必備之寶。
NT$190NT$80 未稅 -
Micro SD卡讀寫模組 SPI介面,迷你TF卡讀寫 MicroSD Card Adapter 相容Arduino
0 滿分 5 分NT$40 未稅MicroSD Card Adapter是Micro SD卡讀寫模組,通過檔案系統及SPI介面驅動程式,單片機系統即可完成MicroSD卡內的檔進行讀寫。Arduino用戶可直接使用Arduino IDE自帶的SD卡程式庫即可完成卡的初始化和讀寫。
-
12位 WS2812 5050 RGB LED 內置全彩驅動 環狀彩燈開發板 NeoPixel Stick 副廠
0 滿分 5 分WS2812B RGB 燈環 內置智慧驅動晶片,僅需一條信號線即可控制 1600萬色。具備智能反接保護與信號整形電路,確保顯示穩定。可在Arduino、單晶片專案中,實現炫彩光效。
NT$120NT$60 未稅 -
TTP223B 電容式觸摸感測器模組 – 1路觸摸開關 (點動型), 支援 Arduino/ESP32
0 滿分 5 分NT$40 未稅TTP223B 電容式觸摸感測器模組,採點動型輸出(輕觸即發),感應靈敏且反應快速。支援 2V-5.5V 寬電壓,具備低功耗模式。可穿透塑膠、玻璃等非金屬材質,適合製作隱藏式按鍵或檯燈控制。內建電源指示燈與 M2 定位孔,是 Arduino 創客與物聯網開發的理想人機介面零件。
-
10K 線性滑動電位計模組 (滑桿式) | 雙路類比訊號輸出 | 支援 Arduino 互動專案開發
0 滿分 5 分線性滑動電位器模組最大阻值為10K歐,當你把控制桿從一端滑到另外一端,電位器兩端的電壓值在0到輸入的VCC之間變化 。結合Arduino 感測器擴展板,可實現與位置變化相關的互動作品。雙聯直滑電位器,具有2個輸出埠,資料線隨意插一邊使用效果都是一樣的,相當於做了一個備用。
NT$114NT$80 未稅 -
4×4 16鍵矩陣薄膜鍵盤 支援Arduino
0 滿分 5 分矩陣薄膜鍵盤帶有8P杜邦頭,間距2.54mm。可插上排針,然後連接到Arduino,使用非常簡單。鍵盤背面白色貼紙可揭去,能牢固粘貼於機箱表面。你可以用它輸入數字參數等信息,特別是對於LCD模組,GSM/GPRS模塊等需要參數輸入的模塊。薄膜防水耐用,可經受幾萬次按壓。
NT$60NT$40 未稅 -
Grove – Fingerprint Sensor 光學指紋感測器模組 指紋建檔/識別
0 滿分 5 分指紋感測器模組通過光學檢測,識別輸入的指紋是否和已經建檔錄存的指紋數據統一。本指紋識別感測器採用高性能的DSP晶片進行圖片渲染、計算、識別、搜索。你也可以直接錄存新的指紋,最多可以錄入162個。
NT$1,667NT$1,300 未稅 -
Grove – Encoder 旋轉編碼器 增量式360度旋轉編碼器 Seeed Studio
0 滿分 5 分Grove – Encoder 旋轉編碼器 ,這個模組是增量式旋轉編碼器。它編碼由軸和輸出由電子脈衝信號的旋轉信號。 當你需要一個旋鈕解碼器添加到您的項目,例如音量旋鈕,揚聲器,選擇面板或數字輸入,這將是你第一選擇。NT$200NT$180 未稅























