HPDL-1414 (Agilent Technologies)


Připojení k Arduinu

Pin HPDL-1414Název pinu HPDL-1414Pin Arduino
1D6D10
2D4D9
3WRD2
4A1D3
5A0D4
6Vdd5V
7GNDGND
8D0D5
9D1D6
10D2D7
11D3D8
12D5D11

Zdrojový kód pro Arduino

#define HPDL1414_A0 4
#define HPDL1414_A1 3
#define HPDL1414_WR 2
const byte HPDL1414_D[] = {5, 6, 7, 8, 9, 10, 11};
char msg[] = "     HPDL-1414 DEMO     ";

void setup() {
  for (byte i = 0; i < 7; i++) {
    pinMode(HPDL1414_D[i], OUTPUT);
  }
  pinMode(HPDL1414_A0, OUTPUT);
  pinMode(HPDL1414_A1, OUTPUT);
  pinMode(HPDL1414_WR, OUTPUT);
}

void loop() {
  for (byte p = 3; p <= 20; p++) {
    for (byte c = 0; c < 7; c++) {
      digitalWrite(HPDL1414_A0, bitRead(c, 0));
      digitalWrite(HPDL1414_A1, bitRead(c, 1));
      for (byte i = 0; i < 7; i++) {
        digitalWrite(HPDL1414_D[i], bitRead(msg[p - c], i));
      }
      if (c < 4) {
        digitalWrite(HPDL1414_WR, LOW);
        digitalWrite(HPDL1414_WR, HIGH);
      }
    }
    delay(300);
  }
}

Demo video


Leave a Reply