|
|
|
HDSP-2111
Specificaties:
- Merk: HP / Agilent
- Type: HDSP-2111
- Display type: LED
- Resolutie: 8 digit, 7x5 matrix
- Achtergrondverlichting: Geen
- Aansturing: Parallel
- Controller: Custom
Filmpjes:
Filmpje 1: YouTube
Filmpje 2: YouTube
Aansluitingen:
Pin Function |
HDSP-2111 |
Arduino |
|
Pin Function |
HDSP-2111 |
Arduino |
RST |
1 |
A0 |
|
GND |
15 |
GND |
FL |
2 |
+5V |
|
GND |
16 |
GND |
A0 |
3 |
A2 |
|
CE |
17 |
10 |
A1 |
4 |
A3 |
|
RD |
18 |
11 |
A2 |
5 |
A4 |
|
D0 |
19 |
0 |
A3 |
6 |
A5 |
|
D1 |
20 |
1 |
N/C |
7 |
|
|
N/C |
21 |
|
N/C |
8 |
|
|
N/C |
22 |
|
N/C |
9 |
|
|
D2 |
23 |
2 |
A4 |
10 |
+5V |
|
D3 |
24 |
3 |
CLS |
11 |
+5V |
|
D4 |
25 |
4 |
CLK |
12 |
|
|
D5 |
26 |
5 |
WR |
13 |
A1 |
|
D6 |
27 |
6 |
Vdd |
14 |
+5V |
|
D7 |
28 |
7 |
Voorbeeld Arduino code:
/*
Demo Code for HDSP-2111
Jos van Dijken
www.josvandijken.nl
28 april 2012
Based on the code from:
Matt Joyce < matt at nycresistor.com >
Mark Tabry
*/
int RST = A0;
int WR = A1;
int CE = 10;
int RD = 11;
int AD0 = A2;
int AD1 = A3;
int AD2 = A4;
int AD3 = A5;
int D0 = 0;
int D1 = 1;
int D2 = 2;
int D3 = 3;
int D4 = 4;
int D5 = 5;
int D6 = 6;
int D7 = 7;
int incomingByte = 0;
void setup()
{
pinMode(RST , OUTPUT);
pinMode(WR , OUTPUT);
pinMode(CE , OUTPUT);
pinMode(RD , OUTPUT);
pinMode(AD0 , OUTPUT);
pinMode(AD1 , OUTPUT);
pinMode(AD2 , OUTPUT);
pinMode(AD3 , OUTPUT);
pinMode(D0 , OUTPUT);
pinMode(D1 , OUTPUT);
pinMode(D2 , OUTPUT);
pinMode(D3 , OUTPUT);
pinMode(D4 , OUTPUT);
pinMode(D5 , OUTPUT);
pinMode(D6 , OUTPUT);
pinMode(D7 , OUTPUT);
digitalWrite(CE, HIGH);
digitalWrite(WR, HIGH);
resetDisplay();
}
void resetDisplay()
{
digitalWrite(RST, LOW);
delayMicroseconds(1);
digitalWrite(RST,HIGH);
delayMicroseconds(150);
digitalWrite(AD3, HIGH);
}
void writeDisplay(char *input)
{
for (int i=0; i<8; i++)
{
digitalWrite(AD0, (1&i)!=0?HIGH:LOW);
digitalWrite(AD1, (2&i)!=0?HIGH:LOW);
digitalWrite(AD2, (4&i)!=0?HIGH:LOW);
PORTD = input[i];
delay(1);
digitalWrite(CE, LOW);
delay(1);
digitalWrite(WR, LOW);
delay(1);
digitalWrite(WR, HIGH);
delay(1);
digitalWrite(CE, HIGH);
delay(1);
}
}
void scrollDisplay(char *words)
{
char buffer[9];
int i = 0;
while(words[i] != 0)
{
boolean blank = false;
for (int j = 0; j<8; j++)
{
if ( !blank && words[i+j] == 0 )
{
blank = true;
}
if ( blank )
{
buffer[j] = ' ';
}
else
{
buffer[j] = words[i+j];
}
}
buffer[8]=0;
writeDisplay(buffer);
delay(200);
i++;
}
}
void loop()
{
char intro[] = " www.josvandijken.nl ";
scrollDisplay(intro);
delay(2000);
}
Foto's:
Downloads:
Reacties: Er zijn nog geen reacties op deze pagina.
beast-nylons
beast-nylons
© Copyright Jos van Dijken 2003-2024
Alle teksten, foto's, tekeningen en grafieken mogen op
geen enkele wijze worden verspreid, gebruikt en/of overgenomen zonder voorafgaande toestemming van de auteur.
Gegenereerd in: 0,04265 seconden.
|