TIL311 / DIS1417 (Texas Instruments)


Připojení k Arduinu

Pin TIL311Název pinu TIL311Pin Arduino
1LED SUPPLY VOLTAGE5V
2LATCH DATA INPUT BD3
3LATCH DATA INPUT AD2
4LEFT DECIMAL POINT CATHODE
5STROBEGND
6NC
7GNDGND
8BLANKING INPUTD6
9NC
10RIGHT DECIMAL POINT CATHODE
11NC
12LATCH DATA INPUT DD5
13LATCH DATA INPUT CD4
14LOGIC SUPPLY VOLTAGE (Vcc)5V

Zdrojový kód pro Arduino

#define BLANK_INPUT 6

#define LATCH_DATA_A 2
#define LATCH_DATA_B 3
#define LATCH_DATA_C 4
#define LATCH_DATA_D 5

void display (uint8_t value)
{
  digitalWrite (LATCH_DATA_A, bitRead (value, 0));
  digitalWrite (LATCH_DATA_B, bitRead (value, 1));
  digitalWrite (LATCH_DATA_C, bitRead (value, 2));
  digitalWrite (LATCH_DATA_D, bitRead (value, 3));
}

void setup ()
{
  pinMode (BLANK_INPUT, OUTPUT);
  pinMode (LATCH_DATA_A, OUTPUT);
  pinMode (LATCH_DATA_B, OUTPUT);
  pinMode (LATCH_DATA_C, OUTPUT);
  pinMode (LATCH_DATA_D, OUTPUT);
  digitalWrite (BLANK_INPUT, LOW);
}

void loop ()
{
  static byte i = 0;
  display (i++);
  if (i > 15) i = 0;
  delay (300);
}




Demo video

TIL311, DIS1417 a DIALCO 980-8431 (shora dolů)


Leave a Reply