background image

18-CHANNEL LED DRIVER EVALUATION BOARD GUIDE 

Integrated Silicon Solution, Inc. – ams.issi.com

  

 

Rev. B, 12/28/2018 

APPENDIX 

: IS31FL3238 Arduino Test Code V01A 

#include<Wire.h> 
#include<avr/pgmspace.h> 
#define Addr_GND 0x68 
//7 bit format is 0x3F 
 
byte PWM_Gamma64[64]= 

  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 
}; 
 
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 
  //delay(100); //keep 0.5s 
  Init_FL3238(); 

 
void loop() { 
    // put your main code here, to run repeatedly: 
  // delay(50);    
  Init_FL3238(); 
  IS31FL3238_mode1();//breath mode   
 

 
void IS_IIC_WriteByte(uint8_t Dev_Add,uint8_t Reg_Add,uint8_t Reg_Dat) 

  Wire.beginTransmission(Dev_Add/2);  
    Wire.write(Reg_Add); // sends regaddress 
    Wire.write(Reg_Dat); // sends regaddress 
    Wire.endTransmission(); // stop transmitting 

 
void Init_FL3238(void) 

    uint8_t i = 0; 
   for(i=0x4A;i<=0x6D;i++) 
    { 
    IS_IIC_WriteByte(Addr_GND,i,0xFF);//write all scaling 
    } 
  IS_IIC_WriteByte(Addr_GND,0x6e,0xff);//GCC 
    IS_IIC_WriteByte(Addr_GND,0x49,0x00);//update PWM & congtrol registers 
  IS_IIC_WriteByte(Addr_GND,0x00,0x01);//normal operation  

 
void IS31FL3238_mode1(void)//white LED 

  int i=0,j=0; 
  for(j=0;j<=63;j++) 
    { 
    for(i=0x01;i<=0x47;i=i+2) 
        { 
      IS_IIC_WriteByte(Addr_GND,i, PWM_Gamma64[j]);//write all PWM set 0x80     
      IS_IIC_WriteByte(Addr_GND,0x49,0x00);//update PWM & congtrol registers 
        } 
    delay(10); //keep 0.5s 
    } 
    for(j=63;j>=0;j--) 
    { 
    for(i=0x01;i<=0x47;i=i+2) 
        { 

Summary of Contents for IS31FL3238

Page 1: ...QFN 28 5mm 5mm packages QUICK START Figure 1 Photo of IS31FL3238 QWLS4 Evaluation Board RECOMMENDED EQUIPMENT 5 0V 2A power supply ABSOLUTE MAXIMUM RATINGS 5 5V power supply Caution Do not exceed the conditions listed above otherwise the board will be damaged PROCEDURE The IS31FL3238 evaluation board is fully assembled and tested Follow the steps listed below to verify board operation Caution Do n...

Page 2: ...n Atmel microcontroller with a bootloader allowing quick firmware updates First download the latest Arduino Integrated Development Environment IDE 1 6 12 or greater from www arduino cc en Main Software Also download the Wire h library from www arduino cc en reference wire and verify that pgmspace h is in the directory program Files x86 Arduino hardware tools avr avr include avr Then download the l...

Page 3: ...A15 JTDI 38 PB3 JTDO 39 PB4 JNTRST 40 PB5 41 PB6 I2C1_SCL TIM4_CH1 42 PB7 I2C1_SDA TIM4_CH2 43 BOOT0 44 PB8 TIM4_CH3 45 PB9 TIM4_CH4 46 VSS_3 47 VDD_3 48 U2 STM32F103C8T6 1 2 3 4 TP3 Header 4 GND SDA SCL SDB GND VDD CLK DIO VRGB VBlue VCC BIT1 BIT2 SDB VUSB 1 2 TP1 1 2 TP2 1 2 JP1 GND GND GND PA0 PA0 OUT01 OUT02 OUT03 OUT04 OUT05 OUT06 OUT07 OUT08 OUT09 OUT10 OUT11 OUT12 OUT13 OUT14 OUT15 OUT16 OU...

Page 4: ...S240 Resistor R1 R3 RES 2k 1 10W 5 SMD 1 Yageo RC0603JR 072KL Resistor R2 R4 R6 R7 R8 RES 100k 1 10W 5 SMD 5 Yageo RC0603JR 07100KL Resistor R5 RES 3 3k 1 10W 5 SMD 1 Yageo RC0603JR 073K3L Resistor R9 RES 1k 1 10W 5 SMD 1 Yageo RC0603JR 071KL Resistor R10 R11 RES 22R 1 10W 5 SMD 1 Yageo RC0603JR 0722RL Resistor R12 RES 1 5k 1 10W 5 SMD 1 Yageo RC0603JR 071K5L Capacitor C1 C2 CAP 100nF 16V 20 SMD 2...

Page 5: ... 12 28 2018 0 0 0 0 8 6 4 2 10 1 3 5 7 9 2 1 2 1 1 2 3 4 0 0 0 0 1 1 2 1 Figure 4 Board Component Placement Guide Top Layer 0 0 0 0 8 6 4 2 10 1 3 5 7 9 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 1 1 2 3 4 29 0 0 0 0 1 1 2 1 Figure 5 Board PCB Layout Top Layer ...

Page 6: ... out of the application or use of any information products or services described herein Customers are advised to obtain the latest version of this device specification before relying on any published information and before placing orders for products Integrated Silicon Solution Inc does not recommend the use of any of its products in life support applications where the failure or malfunction of th...

Page 7: ...DRIVER EVALUATION BOARD GUIDE Integrated Silicon Solution Inc ams issi com 7 Rev B 12 28 2018 REVISION HISTORY Revision Detail Information Data A Initial Release 2018 09 17 B Update schematic and PCB layout 2018 12 28 ...

Page 8: ...HIGH SDB_HIGH delay 100 keep 0 5s Init_FL3238 void loop put your main code here to run repeatedly delay 50 Init_FL3238 IS31FL3238_mode1 breath mode void IS_IIC_WriteByte uint8_t Dev_Add uint8_t Reg_Add uint8_t Reg_Dat Wire beginTransmission Dev_Add 2 Wire write Reg_Add sends regaddress Wire write Reg_Dat sends regaddress Wire endTransmission stop transmitting void Init_FL3238 void uint8_t i 0 for ...

Page 9: ...TION BOARD GUIDE Integrated Silicon Solution Inc ams issi com 9 Rev B 12 28 2018 IS_IIC_WriteByte Addr_GND i PWM_Gamma64 j write all PWM set 0x80 IS_IIC_WriteByte Addr_GND 0x49 0x00 update PWM congtrol registers delay 10 keep 0 5s ...

Reviews: