ArduinoAlphanumeric

README.txt

2:32f0a9119576
2016-09-28 Paul Boddie Added 74HC157 pinout.
     1 From the HT16K33 datasheet [1] and EF4058 schematic [2].
     2 
     3 Addressing
     4 ==========
     5 
     6                             RAM addresses
     7                             ROW0..7     ROW8..15
     8 COM0 -> digit 1, tube 1     00          01
     9 COM1 -> digit 2, tube 1     02          03
    10 COM2 -> digit 1, tube 2     04          05
    11 COM3 -> digit 2, tube 2     06          07
    12 
    13 ROW0/A2  |-> connected to both tubes
    14 ROW1/A1  |
    15 ROW2/A0  |
    16 ROW3..14 |
    17 
    18 Tube and Digit Layout
    19 =====================
    20 
    21 By observing the behaviour, the tubes and digits have the following layout:
    22 
    23 tubes
    24 2       1
    25 digits
    26 1   2   1   2
    27 
    28 Communications
    29 ==============
    30 
    31 I2C commands:
    32 
    33        D15 D14 D13 D12 D11 D10  D9  D8
    34 setup    0   0   1   0   X   X   X   S  S=0 => standby; S=1 => operational
    35 ROW/INT  1   0   1   0   X   X   A   I  I=0 => ROW driver output;
    36                                         I=1 => INT output
    37                                                A=0 => active low
    38                                                A=1 => active high
    39 display  1   0   0   0   X  B1  B0   D  D=0 => display off; D=1 => display on
    40                                         B1..B0 = 0 => blinking off
    41                                         B1..B0 = 2 - log2 (blinking frequency)
    42                                                  (1 => 2Hz; 2 => 1Hz; 3 => 0.5Hz)
    43 address  0   0   0   0  A3  A2  A1  A0  A3..A0 => set row address pointer
    44 dimming  1   1   1   0  P3  P2  P1  P0  P3..P0 = 16 * pulse_width - 1
    45                                                  (0 => 1/16; 15 => 1)
    46 
    47 I2C data format:
    48 
    49         D7  D6  D5  D4  D3  D2  D1  D0
    50 ROW      7   6   5   4   3   2   1   0
    51 ROW     15  14  13  12  11  10   9   8
    52 
    53 When converting values to the I2C format, the most significant byte is sent
    54 after the least significant byte. For example, the following hexadecimal
    55 representation is converted as follows:
    56 
    57    8000400020001000
    58 -> 80 00 40 00 20 00 10 00 (bytes in MSB, LSB order)
    59 -> 00 80 00 40 00 20 00 10 (bytes in LSB, MSB order)
    60 
    61 LED Digit Layout
    62 ================
    63 
    64 The digits each have the following layout:
    65 
    66 LED     ROWx    data value  remark
    67 
    68 ---     ROW0    1           upper horizontal
    69 
    70 
    71 
    72   |     ROW1    2           upper-right vertical
    73 
    74 
    75 
    76         ROW2    4           lower-right vertical
    77 
    78   |
    79 
    80         ROW3    8           lower horizontal
    81 
    82 ---
    83 
    84         ROW4    10          lower-left vertical
    85 
    86 |
    87 
    88 |       ROW5    20          upper-left vertical
    89 
    90 
    91 
    92         ROW6    40          left-middle horizontal
    93 -
    94 
    95 
    96         ROW7    80          right-middle horizontal
    97   -
    98 
    99 
   100 \       ROW8    100         top-left diagonal
   101 
   102 
   103 
   104  |      ROW9    200         upper-middle vertical
   105 
   106 
   107 
   108   /     ROW10   400         top-right diagonal
   109 
   110 
   111 
   112         ROW11   800         lower-right diagonal
   113 
   114   \
   115 
   116         ROW12   1000        lower-middle vertical
   117 
   118  |
   119 
   120         ROW13   2000        lower-left diagonal
   121 
   122 /
   123 
   124         ROW14   4000        decimal point
   125 
   126    .
   127 
   128         ROW15   8000        (not connected)
   129 
   130 
   131 
   132 See the shapes.h file for convenient definitions of the different elements.
   133 
   134 Interfacing
   135 ===========
   136 
   137 It could be useful to interface the display with circuits and to have an
   138 Arduino sample inputs and update the display to reflect the state of those
   139 inputs. In order to represent 16 different signals with 4 hexadecimal digits,
   140 the following circuit could be employed.
   141 
   142 Inputs  74HC157 74HC157 Arduino Display
   143 ------  ------- ------- ------- -------
   144                         A4/SDA  SDA
   145                         A5/SCL  SCL
   146                         5V      VCC
   147         E#      E#      GND     GND
   148         S       S       3
   149 D0      1I0
   150 D1      2I0
   151 D2      3I0
   152 D3      4I0
   153 D4              1I0
   154 D5              2I0
   155 D6              3I0
   156 D7              4I0
   157 D8      1I1
   158 D9      2I1
   159 D10     3I1
   160 D11     4I1
   161 D12             1I1
   162 D13             2I1
   163 D14             3I1
   164 D15             4I1
   165         1Y              4
   166         2Y              5
   167         3Y              6
   168         4Y              7
   169                 1Y      8
   170                 2Y      9
   171                 3Y      10
   172                 4Y      11
   173 
   174 By switching between the two multiplexers, the data signals could be sampled
   175 by the Arduino and appropriate representation values written to the display
   176 module memory.
   177 
   178 74HC157 Pinout
   179 --------------
   180 
   181 S   1  \/  16 VCC
   182 1I0 2      15 E#
   183 1I1 3      14 4I0
   184 1Y  4      13 4I1
   185 2I0 5      12 4Y
   186 2I1 6      11 3I0
   187 2Y  7      10 3I1
   188 GND 8       9 3Y
   189 
   190 References
   191 ==========
   192 
   193 [1] EF4058-OCTOPUS_Alphanumeric_V1.0_SCH.pdf
   194 [2] EF4058-ht16K33v110.pdf