16 CHANNELS LED DRIVER EVALUATION BOARD GUIDE
Integrated Silicon Solution, Inc. – www.issi.com
8
Rev. A, 09/18/2017
APPENDIX
Ⅰ
: IS31FL3216A Arduino Test Code V01A
#include<Wire.h>
#include<avr/pgmspace.h>
#define Addr_GND 0xE8
//7 bit format is 0x74(AD=L) or 0x77(AD=H)
const PROGMEM byte PWM_Gama64[128]=
{
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
0x08,0x09,0x0b,0x0d,0x0f,0x11,0x13,0x16,
0x1a,0x1c,0x1d,0x1f,0x22,0x25,0x28,0x2e,
0x34,0x38,0x3c,0x40,0x44,0x48,0x4b,0x4f,
0x55,0x5a,0x5f,0x64,0x69,0x6d,0x72,0x77,
0x7d,0x80,0x88,0x8d,0x94,0x9a,0xa0,0xa7,
0xac,0xb0,0xb9,0xbf,0xc6,0xcb,0xcf,0xd6,
0xe1,0xe9,0xed,0xf1,0xf6,0xfa,0xfe,0xff,
0xff,0xfe,0xfa,0xf6,0xf1,0xed,0xe9,0xe1,
0xd6,0xcf,0xcb,0xc6,0xbf,0xb9,0xb0,0xac,
0xa7,0xa0,0x9a,0x94,0x8d,0x88,0x80,0x7d,
0x77,0x72,0x6d,0x69,0x64,0x5f,0x5a,0x55,
0x4f,0x4b,0x48,0x44,0x40,0x3c,0x38,0x34,
0x2e,0x28,0x25,0x22,0x1f,0x1d,0x1c,0x1a,
0x16,0x13,0x11,0x0f,0x0d,0x0b,0x09,0x08,
0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00
};
void setup() {
// put your setup code here, to run once:
Wire.begin();
Wire.setClock(400000);//I2C 400kHz
pinMode(4,OUTPUT);//SDB
digitalWrite(4,HIGH);//SDB_HIGH
Init_3216A();
}
void loop() {
// put your main code here, to run repeatedly:
IS31FL3216A_mode1();//breath mode
}
void IS_IIC_WriteByte(uint8_t Dev_Add,uint8_t Reg_Add,uint8_t Reg_Dat)
{
Wire.beginTransmission(Dev_Add/2); // transmit to device IS31FL373x
Wire.write(Reg_Add); // sends regaddress
Wire.write(Reg_Dat); // sends regaddress