0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

共立の激安LCD(DMC40218)をArduinoで使ってみる

0
Posted at

コントローラーICにHD44780が使われてたのでLiquidCrystal.hを使用

接続

LCD正面から見て、

  • 右下:ピン番号1
  • 左下:2
  • 右上:13
  • 左上:14
ピン番号 ピン 役割 Arduino接続先
1 VSS 電源(GND) GND
2 VCC ロジック電源 5V
3 VEE LCD電源 可変抵抗を挟んで5V
4 RS レジスタ選択 D12
5 R/W R/W選択 GND
6 E Enabled D11
7 - 14 DB0 - DB7 データバス D9 - D2

データバスは8ピン全て接続しないと動きませんでした

サンプルコード

#include <LiquidCrystal.h>

// RS, E, Data Bus 0 - 7
LiquidCrystal lcd(12, 11, 9, 8, 7, 6, 5, 4, 3, 2);

void setup() {
    lcd.begin(40, 2);
    lcd.print("\xBA\xDD\xC6\xC1\xCA DMC40218!");
}

void loop() {
    lcd.setCursor(0, 1);
    lcd.print("elapsed time: ");
    lcd.print(millis());
}

文字コード

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?