#include "I2Cdev.h"Go to the source code of this file.
Data Structures | |
| class | MAX6956 |
| #define MAX6956_ADDRESS 0x40 |
Pin|Pin|DEVICE ADDRESS | :-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:–: AD1|AD0|A7 |A6 |A5 |A4 |A3 |A2 |A1 |A0 |HEX GND|GND|1 |0 |0 |0 |0 |0 |0 |RW |0x40 GND|V+ |1 |0 |0 |0 |0 |0 |1 |RW |0x41 GND|SDA|1 |0 |0 |0 |0 |1 |0 |RW |0x42 GND|SCL|1 |0 |0 |0 |0 |1 |1 |RW |0x43 V+ |GND|1 |0 |0 |0 |1 |0 |0 |RW |0x44 V+ |V+ |1 |0 |0 |0 |1 |0 |1 |RW |0x45 V+ |SDA|1 |0 |0 |0 |1 |1 |0 |RW |0x46 V+ |SCL|1 |0 |0 |0 |1 |1 |1 |RW |0x47 SDA|GND|1 |0 |0 |1 |0 |0 |0 |RW |0x48 SDA|V+ |1 |0 |0 |1 |0 |0 |1 |RW |0x49 SDA|SDA|1 |0 |0 |1 |0 |1 |0 |RW |0x50 SDA|SCL|1 |0 |0 |1 |0 |1 |1 |RW |0x51 SCL|GND|1 |0 |0 |1 |1 |0 |0 |RW |0x52 SCL|V+ |1 |0 |0 |1 |1 |0 |1 |RW |0x53 SCL|SDA|1 |0 |0 |1 |1 |1 |0 |RW |0x54 SCL|SCL|1 |0 |0 |1 |1 |1 |1 |RW |0x55
RW bit 0 = Write 1 = Read
| #define MAX6956_CONFIG_GLOBAL_CURRENT_BIT 6 |
| #define MAX6956_CONFIG_POWER_BIT 0 |
| #define MAX6956_CONFIG_TRANSITION_BIT 7 |
| #define MAX6956_DISPLAY_TEST_BIT 0 |
| #define MAX6956_GLOBAL_CURRENT_BIT 0 |
| #define MAX6956_RA_CONFIG_P7P6P5P4 0x09 |
| REGISTER | ADDRESS | D7 D6 | D5 D4 | D3 D2 | D1 D0 |
|---|---|---|---|---|---|
| Port Configuration for P7, P6, P5, P4 | 0x09 | P7 | P6 | P5 | P4 |
| Port Configuration for P11, P10, P9, P8 | 0x0A | P11 | P10 | P9 | P8 |
| Port Configuration for P15, P14, P13, P12 | 0x0B | P15 | P14 | P13 | P12 |
| Port Configuration for P19, P18, P17, P16 | 0x0C | P19 | P18 | P17 | P16 |
| Port Configuration for P23, P22, P21, P20 | 0x0D | P23 | P22 | P21 | P20 |
| Port Configuration for P27, P26, P25, P24 | 0x0E | P27 | P26 | P25 | P24 |
| Port Configuration for P31, P30, P29, P28 | 0x0F | P31 | P30 | P29 | P28 |
00 - Output, LED Segment Driver
Controlled using port registers 0x20-0x5F.
0 = High impedance
1 = Open-drain current sink, with sink current (up to 24mA)
determined by the appropriate current register
01 - Output, GPIO Output
Controlled using port registers 0x20-0x5F.
0 = Active-low logic output
1 = Active-high logic output
10 - Input, GPIO Input Without Pullup
Read port registers 0x20-0x5F.
Schmitt logic input
11 - Input, GPIO Input with Pullup
Read port registers 0x20-0x5F.
Schmitt logic input with pullup
| #define MAX6956_RA_CONFIGURATION 0x04 |
| ADDRESS | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|
| 0x04 | M | I | x | x | x | x | x | S |
| FUNCTION | ADDRESS | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|---|
| Shutdown | 0x04 | M | I | x | x | x | x | x | 0 |
| Normal Operation | 0x04 | M | I | x | x | x | x | x | 1 |
| FUNCTION | ADDRESS | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|---|
| Global | 0x04 | M | 0 | x | x | x | x | x | S |
| Individual Segment | 0x04 | M | 1 | x | x | x | x | x | S |
| FUNCTION | ADDRESS | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|---|
| Disabled | 0x04 | 0 | I | x | x | x | x | x | S |
| Enabled | 0x04 | 1 | I | x | x | x | x | x | S |
| #define MAX6956_RA_CURRENT_0xP5P4 0x12 |
Constant-current limit for each digit is individually controlled by the settings in the Current054 through Current1FE registers
| ADDRESS | |
| FUNCTION | CODE(HEX) | D7 D6 D5 D4 | D3 D2 D1 D0 |
|---|---|---|---|
| Current054 register | 0x12 | Segment 5 | Segment 4 |
| Current076 register | 0x13 | Segment 7 | Segment 6 |
| Current098 register | 0x14 | Segment 9 | Segment 8 |
| Current0BA register | 0x15 | Segment 11 | Segment 10 |
| Current0DC register | 0x16 | Segment 13 | Segment 12 |
| Current0FE register | 0x17 | Segment 15 | Segment 14 |
| Current110 register | 0x18 | Segment 17 | Segment 16 |
| Current132 register | 0x19 | Segment 19 | Segment 18 |
| Current154 register | 0x1A | Segment 21 | Segment 20 |
| Current176 register | 0x1B | Segment 23 | Segment 22 |
| Current198 register | 0x1C | Segment 25 | Segment 24 |
| Current1BA register | 0x1D | Segment 27 | Segment 26 |
| Current1DC register | 0x1E | Segment 29 | Segment 28 |
| Current1FE register | 0x1F | Segment 31 | Segment 30 |
Register data is 0-Fx0-F for 1-16(0-F) brightness levels. To completely blank an output turn it off (0) using port configuration registers.
| #define MAX6956_RA_DISPLAY_TEST 0x07 |
| #define MAX6956_RA_GLOBAL_CURRENT 0x02 |
LED DRIVE |TYPICAL SEGMENT | ADDRESS |
| FRACTION | CURRENT(mA) | CODE (HEX) | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | HEX CODE |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1/16 | 1.5 | 0x02 | x | x | x | x | 0 | 0 | 0 | 0 | 0xX0 |
| 2/16 | 3 | 0x02 | x | x | x | x | 0 | 0 | 0 | 1 | 0xX1 |
| 3/16 | 4.5 | 0x02 | x | x | x | x | 0 | 0 | 1 | 0 | 0xX2 |
| 4/16 | 6 | 0x02 | x | x | x | x | 0 | 0 | 1 | 1 | 0xX3 |
| 5/16 | 7.5 | 0x02 | x | x | x | x | 0 | 1 | 0 | 0 | 0xX4 |
| 6/16 | 9 | 0x02 | x | x | x | x | 0 | 1 | 0 | 1 | 0xX5 |
| 7/16 | 10.5 | 0x02 | x | x | x | x | 0 | 1 | 1 | 0 | 0xX6 |
| 8/16 | 12 | 0x02 | x | x | x | x | 0 | 1 | 1 | 1 | 0xX7 |
| 9/16 | 13.5 | 0x02 | x | x | x | x | 1 | 0 | 0 | 0 | 0xX8 |
| 10/16 | 15 | 0x02 | x | x | x | x | 1 | 0 | 0 | 1 | 0xX9 |
| 11/16 | 16.5 | 0x02 | x | x | x | x | 1 | 0 | 1 | 0 | 0xXA |
| 12/16 | 18 | 0x02 | x | x | x | x | 1 | 0 | 1 | 1 | 0xXB |
| 13/16 | 19.5 | 0x02 | x | x | x | x | 1 | 1 | 0 | 0 | 0xXC |
| 14/16 | 21 | 0x02 | x | x | x | x | 1 | 1 | 0 | 1 | 0xXD |
| 15/16 | 22.5 | 0x02 | x | x | x | x | 1 | 1 | 1 | 0 | 0xXE |
| 16/16 | 24 | 0x02 | x | x | x | x | 1 | 1 | 1 | 1 | 0xXF |
| #define MAX6956_RA_PORT0 0x20 |
| #define MAX6956_RA_PORTS25_31 0x59 |
| #define MAX6956_RA_PORTS26_31 0x5A |
| #define MAX6956_RA_PORTS27_31 0x5B |
| #define MAX6956_RA_PORTS28_31 0x5C |
| #define MAX6956_RA_PORTS29_31 0x5D |
| #define MAX6956_RA_PORTS30_31 0x5E |
| #define MAX6956_RA_PORTS31_31 0x5F |
| #define MAX6956_RA_PORTS4_10 0x43 |
| #define MAX6956_RA_PORTS4_7 0x40 |
| #define MAX6956_RA_PORTS4_8 0x41 |
| #define MAX6956_RA_PORTS4_9 0x42 |
| #define MAX6956_RA_TRANSITION_DETECT 0x06 |
| FUNCTION | REGISTER ADDRESS | READ/WRITE | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|---|---|---|---|---|
| Mask Register | 0x06 | Read | INT Status* | Port | Port | Port | Port | Port | Port | Port |
| 30 | 29 | 28 | 27 | 26 | 25 | 24 | ||||
| Write | Unchanged | mask | mask | mask | mask | mask | mask | mask |
INT is automatically cleared after it is read.
1.8.5