paul@0 | 1 | From the HT16K33 datasheet [1] and EF4058 schematic [2].
|
paul@0 | 2 |
|
paul@0 | 3 | Addressing
|
paul@0 | 4 | ----------
|
paul@0 | 5 |
|
paul@0 | 6 | RAM addresses
|
paul@0 | 7 | ROW0..7 ROW8..15
|
paul@0 | 8 | COM0 -> digit 1, tube 1 00 01
|
paul@0 | 9 | COM1 -> digit 2, tube 1 02 03
|
paul@0 | 10 | COM2 -> digit 1, tube 2 04 05
|
paul@0 | 11 | COM3 -> digit 2, tube 2 06 07
|
paul@0 | 12 |
|
paul@0 | 13 | ROW0/A2 |-> connected to both tubes
|
paul@0 | 14 | ROW1/A1 |
|
paul@0 | 15 | ROW2/A0 |
|
paul@0 | 16 | ROW3..14 |
|
paul@0 | 17 |
|
paul@0 | 18 | Tube and Digit Layout
|
paul@0 | 19 | ---------------------
|
paul@0 | 20 |
|
paul@0 | 21 | By observing the behaviour, the tubes and digits have the following layout:
|
paul@0 | 22 |
|
paul@0 | 23 | tubes
|
paul@0 | 24 | 2 1
|
paul@0 | 25 | digits
|
paul@0 | 26 | 1 2 1 2
|
paul@0 | 27 |
|
paul@0 | 28 | Communications
|
paul@0 | 29 | --------------
|
paul@0 | 30 |
|
paul@0 | 31 | I2C commands:
|
paul@0 | 32 |
|
paul@0 | 33 | D15 D14 D13 D12 D11 D10 D9 D8
|
paul@0 | 34 | setup 0 0 1 0 X X X S S=0 => standby; S=1 => operational
|
paul@0 | 35 | ROW/INT 1 0 1 0 X X A I I=0 => ROW driver output;
|
paul@0 | 36 | I=1 => INT output
|
paul@0 | 37 | A=0 => active low
|
paul@0 | 38 | A=1 => active high
|
paul@0 | 39 | display 1 0 0 0 X B1 B0 D D=0 => display off; D=1 => display on
|
paul@0 | 40 | B1..B0 = 0 => blinking off
|
paul@0 | 41 | B1..B0 = 2 - log2 (blinking frequency)
|
paul@0 | 42 | (1 => 2Hz; 2 => 1Hz; 3 => 0.5Hz)
|
paul@0 | 43 | address 0 0 0 0 A3 A2 A1 A0 A3..A0 => set row address pointer
|
paul@0 | 44 | dimming 1 1 1 0 P3 P2 P1 P0 P3..P0 = 16 * pulse_width - 1
|
paul@0 | 45 | (0 => 1/16; 15 => 1)
|
paul@0 | 46 |
|
paul@0 | 47 | I2C data format:
|
paul@0 | 48 |
|
paul@0 | 49 | D7 D6 D5 D4 D3 D2 D1 D0
|
paul@0 | 50 | ROW 7 6 5 4 3 2 1 0
|
paul@0 | 51 | ROW 15 14 13 12 11 10 9 8
|
paul@0 | 52 |
|
paul@0 | 53 | When converting values to the I2C format, the most significant byte is sent
|
paul@0 | 54 | after the least significant byte. For example, the following hexadecimal
|
paul@0 | 55 | representation is converted as follows:
|
paul@0 | 56 |
|
paul@0 | 57 | 8000400020001000
|
paul@0 | 58 | -> 80 00 40 00 20 00 10 00 (bytes in MSB, LSB order)
|
paul@0 | 59 | -> 00 80 00 40 00 20 00 10 (bytes in LSB, MSB order)
|
paul@0 | 60 |
|
paul@0 | 61 | LED Digit Layout
|
paul@0 | 62 | ----------------
|
paul@0 | 63 |
|
paul@0 | 64 | The digits each have the following layout:
|
paul@0 | 65 |
|
paul@0 | 66 | LED ROWx data value remark
|
paul@0 | 67 |
|
paul@0 | 68 | --- ROW0 1 upper horizontal
|
paul@0 | 69 |
|
paul@0 | 70 |
|
paul@0 | 71 |
|
paul@0 | 72 | | ROW1 2 upper-right vertical
|
paul@0 | 73 |
|
paul@0 | 74 |
|
paul@0 | 75 |
|
paul@0 | 76 | ROW2 4 lower-right vertical
|
paul@0 | 77 |
|
paul@0 | 78 | |
|
paul@0 | 79 |
|
paul@0 | 80 | ROW3 8 lower horizontal
|
paul@0 | 81 |
|
paul@0 | 82 | ---
|
paul@0 | 83 |
|
paul@0 | 84 | ROW4 10 lower-left vertical
|
paul@0 | 85 |
|
paul@0 | 86 | |
|
paul@0 | 87 |
|
paul@0 | 88 | | ROW5 20 upper-left vertical
|
paul@0 | 89 |
|
paul@0 | 90 |
|
paul@0 | 91 |
|
paul@0 | 92 | ROW6 40 left-middle horizontal
|
paul@0 | 93 | -
|
paul@0 | 94 |
|
paul@0 | 95 |
|
paul@0 | 96 | ROW7 80 right-middle horizontal
|
paul@0 | 97 | -
|
paul@0 | 98 |
|
paul@0 | 99 |
|
paul@0 | 100 | \ ROW8 100 top-left diagonal
|
paul@0 | 101 |
|
paul@0 | 102 |
|
paul@0 | 103 |
|
paul@0 | 104 | | ROW9 200 upper-middle vertical
|
paul@0 | 105 |
|
paul@0 | 106 |
|
paul@0 | 107 |
|
paul@0 | 108 | / ROW10 400 top-right diagonal
|
paul@0 | 109 |
|
paul@0 | 110 |
|
paul@0 | 111 |
|
paul@0 | 112 | ROW11 800 lower-right diagonal
|
paul@0 | 113 |
|
paul@0 | 114 | \
|
paul@0 | 115 |
|
paul@0 | 116 | ROW12 1000 lower-middle vertical
|
paul@0 | 117 |
|
paul@0 | 118 | |
|
paul@0 | 119 |
|
paul@0 | 120 | ROW13 2000 lower-left diagonal
|
paul@0 | 121 |
|
paul@0 | 122 | /
|
paul@0 | 123 |
|
paul@0 | 124 | ROW14 4000 decimal point
|
paul@0 | 125 |
|
paul@0 | 126 | .
|
paul@0 | 127 |
|
paul@0 | 128 | ROW15 8000 (not connected)
|
paul@0 | 129 |
|
paul@0 | 130 |
|
paul@0 | 131 |
|
paul@0 | 132 | References
|
paul@0 | 133 | ----------
|
paul@0 | 134 |
|
paul@0 | 135 | [1] EF4058-OCTOPUS_Alphanumeric_V1.0_SCH.pdf
|
paul@0 | 136 | [2] EF4058-ht16K33v110.pdf
|