Řetězení displejů
| Pin HPDL-1414 | Název pinu HPDL-1414 | Pin Arduino |
|---|---|---|
| 1 | D6 | D8 |
| 2 | D4 | D6 |
| 3 | WR | Ax (pro každý displej vlastní pin) |
| 4 | A1 | A2 |
| 5 | A0 | A1 |
| 6 | Vdd | 5V |
| 7 | GND | GND |
| 8 | D0 | D2 |
| 9 | D1 | D3 |
| 10 | D2 | D4 |
| 11 | D3 | D5 |
| 12 | D5 | D7 |
#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);
}
}
Pages: 1 2