HPDL-1414 (Agilent Technologies)

Řetězení displejů

Pin HPDL-1414Název pinu HPDL-1414Pin Arduino
1D6D8
2D4D6
3WRAx (pro každý displej vlastní pin)
4A1A2
5A0A1
6Vdd5V
7GNDGND
8D0D2
9D1D3
10D2D4
11D3D5
12D5D7
#include <HPDL1414.h>

const byte dataPins[7] = {2, 3, 4, 5, 6, 7, 8}; // Segment data pins: D0 - D6
const byte addrPins[2] = {A1, A2};              // Segment address pins: A0, A1
const byte wrenPins[] = {A0, A3, A4, A5};       // Write Enable pins (left to right)
char msg[] = "               *** MULTIPLE HPDL-1414 DEMO ***    More displays here: www.ctvrtky.info";

HPDL1414 hpdl(dataPins, addrPins, wrenPins, sizeof(wrenPins));

void setup() {
  hpdl.begin();
  hpdl.clear();
}

void loop() {
  for (byte i = 0; i < (sizeof(msg) / sizeof(char)); i++) {
    for (byte j = 0; j < 16; j++) {
      hpdl.setCursor(j);
      if (i + j < (sizeof(msg) / sizeof(char))) {
        hpdl.print(msg[i + j]);
      } else {
        hpdl.print(" ");
      }
    }
    delay(200);
  }
}

Leave a Reply