36 #ifndef SAA1064_H_INCLUDED
37 #define SAA1064_H_INCLUDED
49 #define SAA1064_LED_CURRENT01 0x01 //LED current (0 0 1 == 0 * 12mA 0 * 6mA 1 * 3mA)
50 #define SAA1064_LED_CURRENT02 0x02 //LED current (0 1 0 == 0 * 12mA 1 * 6mA 0 * 3mA)
51 #define SAA1064_LED_CURRENT03 0x03 //LED current (0 1 1 == 0 * 12mA 1 * 6mA 1 * 3mA)
52 #define SAA1064_LED_CURRENT04 0x04 //LED current (1 0 0 == 0 * 12mA 0 * 6mA 0 * 3mA)
53 #define SAA1064_LED_CURRENT05 0x05 //LED current (1 0 1 == 1 * 12mA 0 * 6mA 1 * 3mA)
54 #define SAA1064_LED_CURRENT06 0x06 //LED current (1 1 0 == 1 * 12mA 1 * 6mA 0 * 3mA)
55 #define SAA1064_LED_CURRENT07 0x07 //LED current (1 1 1 == 1 * 12mA 1 * 6mA 1 * 3mA)
59 #define SAA1064_IO_SUCCESS 0xe0 //i/o operation was successful
60 #define SAA1064_WRONG_ADDRESS 0xe1 //wrong I2C adress
61 #define SAA1064_WRONG_MODE 0xe2 //wrong value for display mode
62 #define SAA1064_INIT_ERROR 0xe3 //error during initialization of SAA1064 (invalid control byte data received)
63 #define SAA1064_IO_ERROR 0xe4 //error during SAA1064 I/O (internal/unknown error - e.g. wrong register length)
66 #define SAA1064_NUMBER_RETRIES 3 //number of retries if I2C Bus is blocked (see also I2C_RETRY_WAIT_US in "i2c.h")
68 #define SAA1064_INIT_DELAY_MS 500.0 //delay during two initialization messages [ms]
69 #define SAA1064_DEMO_DELAY_MS 50.0 //delay during two demo messages [ms]
70 #define SAA1064_DEMO_LOOPS 5 //number of demo loops
74 #define SAA1064_STATIC_MODE 0x00 //static mode of SAA1064 (C0 = 0)
75 #define SAA1064_DYNAMIC_MODE 0x01 //dynamic mode of SAA1064 (C0 = 1)
79 #define I2C_SAA1064_ADDRESS0 0x70 //I2C address (including write bit "0") for ADR Pin = 0 V
80 #define I2C_SAA1064_ADDRESS1 0x72 //I2C address (including write bit "0") for ADR Pin = 3/8 Vcc
81 #define I2C_SAA1064_ADDRESS2 0x74 //I2C address (including write bit "0") for ADR Pin = 5/8 Vcc
82 #define I2C_SAA1064_ADDRESS3 0x76 //I2C address (including write bit "0") for ADR Pin = Vcc
84 #define I2C_SAA1064_NUMBER_REG 7 //number of data registers including address
85 #define I2C_SAA1064_NUMBER_STAT 2 //number of status registers including address
152 #define BCD_TABLE_LENGTH 23 //number of entries in numbers_bcd_table
153 #define BCD_TABLE_DECIMAL_POINT_VALUE 20 //entry which contains the decimal point "."
154 #define BCD_TABLE_ERROR_VALUE 21 //entry which contains the error sign "-"
155 #define BCD_TABLE_OFF_VALUE 22 //entry which contains no output
156 #define BCD_DECIMAL_POINT_OFFSET 10 //offset value for all values with decimal point
158 static const unsigned char numbers_bcd_table[]
PROGMEM = {
197 #endif // SAA1064_H_INCLUDED