welcome iCShop!     服務時間:週一 ~ 週五 9:00~12:00 / 13:00~17:00
LCD1602/2004轉接板(IIC/I2C/接口)
LCD1602/2004轉接板(IIC/I2C/接口)

LCD1602/2004轉接板(IIC/I2C/接口)

NT$ 32


產品貨號

368030500701

品牌

原廠貨號


數量

  庫存量:37

運送方式

7-11取貨付款 郵寄(單一運費) 宅配 宅配貨到付款 外島郵寄 順豐快遞 順豐快遞貨到付款

商品簡介

原來的LCD1602屏/LCD2004屏,需要7個IO口才能驅動起來,Arduino IIC/I2C/接口轉接板,採用I2C通訊控制,只占用2個IO口,這個模組可以幫你省5個IO口

使用前請確認模組之IC型號,依據型號來調整程式碼中的I2C位址。
如是PCF8574A就修改成0x3F
如是PCF8574就修改成0x27

商品規格
  • 規格:41.5 x 19 x 15.3 mm
  • 重量:5g
  • PCB顏色:黑色
  • 供電電壓:+5V
  • 支援I2C協定
  • 帶背光電源控制,可以通過跳線帽設置是否連接背光電源,插上跳線帽為連接背光電源,拔掉跳線帽為斷開背光電源。
  • 對比度可調節,旋轉藍色電位器,順時針增強,逆時針減弱,電位器在正面,方便自由調節。
  • 模塊可並聯,最多可並聯8個,通過短路A0/A1/A2修改設備地址,默認地址為0x27。

如何查詢I2C位址

操作流程

STEP 1. 將欲查詢的模組連接至Arduino UNO(附圖為腳位參考,實際請比對商品標示接線)

STEP 2. 開啟Arduino IDE並新增檔案

STEP 3. 貼入教學下方的範例文件,並上傳到Arduino UNO,即會開始掃描I2C位址

STEP 4. 開啟序列埠監控視窗,即可取得I2C位址

I2C掃描範例程式

/ ---------------------------------------------------------------- /
// Arduino I2C Scanner
// Re-writed by Arbi Abdul Jabbaar
// Using Arduino IDE 1.8.7
// Using GY-87 module for the target
// Tested on 10 September 2019
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
/ ---------------------------------------------------------------- /
#include //include Wire.h library
void setup()
{
Wire.begin(); // Wire communication begin
Serial.begin(9600); // The baudrate of Serial monitor is set in 9600
while (!Serial); // Waiting for Serial Monitor
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address; //variable for error and I2C address
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for (address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address < 16)
Serial.print("0");
Serial.print(address, HEX);
Serial.println(" !");
nDevices++;
}
else if (error == 4)
{
Serial.print("Unknown error at address 0x");
if (address < 16)
Serial.print("0");
Serial.println(address, HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for the next I2C scan
}
出貨清單
  • LCD1602/2004轉接板(IIC/I2C/接口) x 1