AS3661 [AMSCO]

Programmable 9-channel LED Dr iver; 可编程的9通道LED医生IVER
AS3661
型号: AS3661
厂家: AMS(艾迈斯)    AMS(艾迈斯)
描述:

Programmable 9-channel LED Dr iver
可编程的9通道LED医生IVER

文件: 总87页 (文件大小:3127K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
austriamicrosystems AG  
is now  
ams AG  
The technical content of this austriamicrosystems datasheet is still valid.  
Contact information:  
Headquarters:  
ams AG  
Tobelbaderstrasse 30  
8141 Unterpremstaetten, Austria  
Tel: +43 (0) 3136 500 0  
e-Mail: ams_sales@ams.com  
Please visit our website at www.ams.com  
Datasheet  
AS3661  
Programmable 9-channel LED Driver  
1 General Description  
2 Key Features  
Three independent program execution engines; 9  
programmable outputs with 25.5 mA full-scale  
current, 8- bit current setting resolution and 12-bit  
PWM control resolution  
The AS3661 is a 9-channel LED driver designed to  
produce lighting effects for mobile devices. A high-  
efficiency charge pump enables LED driving over full Li-  
Ion battery voltage range. The device is equipped with  
an internal program memory, which allows operation  
without processor control. The AS3661 maintains  
excellent efficiency over a wide operating range by  
autonomously selecting the best charge pump gain  
based on LED forward voltage requirements. AS3661 is  
able to automatically enter power-save mode when LED  
outputs are not active, thus lowering idle current  
consumption down to 10 µA (typ).  
Adaptive charge pump with 1x and 1.5x gain  
provides up to 95% LED drive efficiency  
Charge pump with soft start and overcurrent/short  
circuit protection  
Built-in LED test  
Automatic power save mode; IVDD = 10 µA (typ.)  
Two wire, I2C-compatible, ntrol nterface  
Flexibinstruction set  
The AS3661 has an I2C-compatible control interface  
with four pin selectable addresses. Also, the device has  
a flexible General Purpose Output (GPO), which can be  
used as a digital control pin for other devices. INT pin  
can be used to notify processor when a lighting  
sequence has ended (interrupt - function). Also, the  
device has a trigger input interface, which allows  
synchronization between multiple devices.The deice  
requires only four small and low-cost ceramic  
capacitors.  
Large SRAM program memory  
Small applicaticircuit  
Source (high sde) drivers  
Minimum number of external components  
Archture supports color control  
The AS3661 is available in a tiny WL-CS-25  
(2.285x2.285mm) 0.4mm pitch packag.  
3 Applications  
Te product is ideal for fun and indicator lights, LED  
backlighting, and programmable current source.  
Figure 1. AS3661 LED Driver Block Diagram  
ꢊ12-/  
/ꢇ0 ꢊ12-!/  
ꢆ 7 ꢆ 8  
ꢆꢗ8  
ꢇꢈꢉꢊꢋꢈꢌꢍꢎꢊ  
ꢆꢏꢐꢑꢒꢎꢊꢓꢔꢕꢖ  
ꢗꢘꢗꢙꢊꢗꢘꢗꢚꢛꢊꢜꢈꢝꢎꢍ  
ꢁꢂꢃ  
 
ꢀꢆꢓ  
ꢀꢆꢓ+,ꢃ  
ꢗꢚ-./  
 
ꢗꢚ-
ꢇ'ꢅ2  
ꢇ'ꢅꢗ  
ꢇ'ꢅ  
ꢇ'ꢅ3  
ꢇ'ꢅ4  
ꢇ'ꢅ1  
ꢇ'ꢅ5  
ꢇ'ꢅꢛ  
ꢇ'ꢅ6  
ꢄꢅꢂ  
ꢆꢇ  
 
 ꢆꢊꢞ!"ꢎꢑ#ꢐ$ꢎ  
ꢂꢝ%ꢐ!$ꢎꢝ  
ꢓꢐ""ꢎꢑ!  
ꢆꢈ!"ꢑꢈ&  
'ꢋ  
ꢆꢇ:4 :  
ꢃ;ꢞ9  
ꢞꢋꢃ  
ꢇ'ꢅꢊꢃꢎꢍ"  
ꢄꢎ(ꢔꢎ!$ꢎꢑ  
9ꢓ+  
ꢂꢄ'ꢇ-  
ꢂꢄ'ꢇꢗ  
ꢄ)!$ꢏꢑꢈ!ꢌ*ꢐ"ꢌꢈ!  
9ꢋꢅ  
ꢞ ꢆꢊꢂꢝꢝꢑꢎꢍꢍ  
ꢄꢎ&ꢎ$"  
www.austriamicrosystems.com  
Revision 1.3  
1 - 85  
AS3661  
Datasheet  
Contents  
1 General Description ............................................................................................................................1  
2 Key Features .......................................................................................................................................1  
3 Applications ........................................................................................................................................1  
4 Pinout ...................................................................................................................................................5  
4.1 Pin Assignment ..............................................................................................................................................5  
4.2 Pin Description ..............................................................................................................................................5  
5 Absolute Maximum Ratings ...............................................................................................................7  
6 Electrical Characteristics .................................................................................................................
7 Typical Operating Characteristics ..................................................................................................12  
8 Detailed Description .......................................................................................................................14  
8.1 Programming ............................................................................................................................................14  
8.2 LED Error Detection ..................................................................................................................................14  
8.3 Energy Efficiency ...................................................................................................................................14  
8.4 Temperature Compensation .................................................................................................................14  
8.5 Modes of Operation ............................................................................................................................16  
8.5.1 RESET ......................................................................................................................................16  
8.5.2 STANDBY ......................................................................................................................................16  
8.5.3 STARTUP ........................................................................................................................................16  
8.5.4 NORMAL ...........................................................................................................................................16  
8.5.5 POWER SAVE .............................................................................................................................16  
8.6 Charge Pump Operational Descriptn .................................................................................................17  
8.6.1 Overview ........................................................................................................................................17  
8.6.2 Output Resistance ........................................................................................................................17  
8.6.3 Controlling the Charge mp ......................................................................................................18  
8.6.4 LED Forward Voltage Monitoring ...............................................................................................18  
8.6.5 Gain Change Hysteresis ....................................................................................................................18  
8.6.6 Automatic Power Save Mode ............................................................................................................19  
8.6.7 PWM Power Save Mode ....................................................................................................................19  
8.7 LED Driver Operational Descriptin ...........................................................................................................20  
8.7.1 Powering LEDs ..............................................................................................................................21  
8.7.2 Controlling the Hig-side LED Drivers ..................................................................................................21  
8.8 I2C Compatible Contrl Interface .................................................................................................................22  
8.8.1 I2C Address selecton ...........................................................................................................................22  
8.8.2 Bus Not Bsy .......................................................................................................................................22  
8.8.3 SarDaa Transfer ...............................................................................................................................22  
8.8.4 Stop Data Transfer ...............................................................................................................................22  
8.8.Data Valid .............................................................................................................................................22  
8.8.6 cknowledge ........................................................................................................................................22  
8.7 Program Downloading ..........................................................................................................................25  
8.9 Register Set .................................................................................................................................................25  
8.0 Control Register Details .............................................................................................................................35  
8.10.1 ENABLE/ ENGINE CONTROL1 .........................................................................................................35  
8.10.2 ENGINE CNTRL2 ..............................................................................................................................36  
8.10.3 OUTPUT DIRECT/RATIOMETRIC MSB and LSB .............................................................................37  
8.10.4 OUTPUT ON/OFF CONTROL MSB and LSB ....................................................................................38  
www.austriamicrosystems.com  
Revision 1.3  
2 - 85  
AS3661  
Datasheet  
8.10.5 LEDx Control ......................................................................................................................................39  
8.10.6 LEDx PWM .........................................................................................................................................45  
8.10.7 LEDx CURRENT CONTROL .............................................................................................................48  
8.10.8 MISC ..................................................................................................................................................51  
8.10.9 ENGINEx PC ......................................................................................................................................52  
8.10.10 STATUS/INTERRUPT .....................................................................................................................52  
8.10.11 GPO .................................................................................................................................................54  
8.10.12 VARIABLE ........................................................................................................................................54  
8.10.13 RESET .............................................................................................................................................54  
8.10.14 TEMP ADC CONTROL .................................................................................................................55  
8.10.15 TEMPERATURE READ ...............................................................................................................
8.10.16 TEMPERATURE WRITE .............................................................................................................
8.10.17 LED TEST CONTROL .................................................................................................................56  
8.10.18 LED TEST ADC ..........................................................................................................................57  
8.10.19 ENGINE1 VARIABLE A .............................................................................................................58  
8.10.20 ENGINE2 VARIABLE A ...............................................................................................................58  
8.10.21 ENGINE3 VARIABLE A ..........................................................................................................58  
8.10.22 MASTER FADER1 ..................................................................................................................58  
8.10.23 49 MASTER FADER2 ...........................................................................................................59  
8.10.24 4A MASTER FADER3 .............................................................................................................59  
8.10.25 ENG1 PROG START ADDR .....................................................................................................59  
8.10.26 ENG2 PROG START ADDR .....................................................................................................59  
8.10.27 ENG3 PROG START ADDR .......................................................................................................59  
8.10.28 PROG MEM PAGE SELECT ..................................................................................................60  
8.10.29 ENG1 MAPPING MSB .........................................................................................................60  
8.10.30 71H ENG1 MAPPING SB .........................................................................................................60  
8.10.31 ENG2 MAPPING MB ..............................................................................................................61  
8.10.32 ENG2 MAPPING LS.................................................................................................................61  
8.10.33 ENG3 MAPPING MSB ..........................................................................................................61  
8.10.34 ENG3 MAPPING LSB ...................................................................................................................62  
8.10.35 GAIN CHANGE CTRL ..................................................................................................................63  
8.11 Instruction Set ..........................................................................................................................................64  
8.12 LED Driver Instructions ..........................................................................................................................67  
8.12.1 RAMP (Numerical Opera) ............................................................................................................67  
8.12.2 RAMP (Variables..............................................................................................................................68  
8.12.3 SET PWM (Nmecal Operands) ......................................................................................................69  
8.12.4 SET PWM Varibles) ........................................................................................................................70  
8.12.5 WAIT .............................................................................................................................................70  
8.13 LED MappinInstuctions ..........................................................................................................................71  
8.13.1 MUX_LD_START ...............................................................................................................................71  
8.132 MUX_LD_END ...................................................................................................................................71  
8.13.3 MUX_MAP_START ............................................................................................................................72  
13.4 MUX_SEL ..........................................................................................................................................72  
8.13.5 MUX_CLR ..........................................................................................................................................72  
8.13.6 MUX_MAP_NEXT ..............................................................................................................................73  
8.13.7 MUX_MAP_PREV ..............................................................................................................................73  
8.13.8 MUX_LD_NEXT .................................................................................................................................74  
8.13.9 MUX_LD_PREV .................................................................................................................................74  
8.13.10 MUX_MAP_ADDR ...........................................................................................................................74  
www.austriamicrosystems.com  
Revision 1.3  
3 - 85  
AS3661  
Datasheet  
8.13.11 MUX_LD_ADDR ..............................................................................................................................74  
8.14 Branch Instructions ....................................................................................................................................75  
8.14.1 RST ....................................................................................................................................................75  
8.14.2 BRANCH (Numerical) ........................................................................................................................75  
8.14.3 BRANCH (Variables) ..........................................................................................................................76  
8.14.4 INT .....................................................................................................................................................76  
8.14.5 END ....................................................................................................................................................76  
8.14.6 TRIGGER ...........................................................................................................................................76  
8.14.7 JNE/JL/JGE/JE ..................................................................................................................................7
8.15 Arithmetic Instructions ...............................................................................................................................78  
8.15.1 LD ......................................................................................................................................................
8.15.2 ADD (Numerical Operands) .............................................................................................................8  
8.15.3 ADD (Variables) ..............................................................................................................................78  
8.15.4 SUB (Numerical) ..............................................................................................................................79  
8.15.5 SUB (Variables) .............................................................................................................................79  
9 Typical Application .........................................................................................................................81  
9.1 Recommended External Components ....................................................................................................82  
10 Package Drawings and Markings ............................................................................................83  
11 Ordering Information .................................................................................................................84  
www.austriamicrosystems.com  
Revision 1.3  
4 - 85  
AS3661  
Datasheet - Pinout  
4 Pinout  
4.1 Pin Assignment  
Figure 2. Pin Assignments (Top View)  
ꢀꢈ  
ꢀꢉ  
ꢀꢇ  
ꢀꢆ  
ꢀꢁ  
ꢂꢈ  
ꢂꢉ  
ꢂꢇ  
ꢂꢆ  
ꢃꢈ  
ꢃꢉ  
ꢃꢇ  
ꢃꢆ  
ꢃꢁ  
ꢅꢈ  
ꢅꢉ  
ꢅꢇ  
ꢅꢆ  
ꢄꢈ  
ꢄꢉ  
ꢄꢇ  
ꢄꢆ  
ꢄꢁ  
ꢀꢁꢂꢃꢄꢅ  
ꢆꢂꢇꢁꢈꢉꢊꢋꢌ  
4.2 Pin Description  
Table 1. Pin Description for AS3661  
Pin Number  
Pin Name  
LED1  
LED2  
VCP  
Desription  
LED1 Ouut. Current source froVCP.  
A1  
A2  
A3  
A4  
A5  
B1  
B2  
B3  
B4  
B5  
C1  
C2  
C3  
C4  
C
D1  
D2  
LED2 Otput. Current source om VCP.  
ChargPump output. short connection to capacitor CVCPOUT.  
Charge Pump flyig capacitor 2. make a short connection to capacitor CFLY2.  
Charge Pump flyincpacitor 2. make a short connection to capacitor CFLY2.  
LED3 OutpuCurrent source from VCP.  
C2-  
C2+  
LED3  
LED4  
ASEL1  
C1-  
LED4 Outt. Current source from VCP.  
Digital int - I²C address select  
Chrge Pump flying capacitor 1. make a short connection to capacitor CFLY1.  
Carge Pump flying capacitor 1. make a short connection to capacitor CFLY1.  
LED5 Output. Current source from VCP.  
C1+  
LED5  
LED
ASEL0  
EN  
LED6 Output. Current source from VCP.  
Digital input - I²C address select  
Enable. Active high digital input.  
Positive Power Supply Input  
VBAT  
LED7  
LED8  
LED7 Output. Current source from VBAT.  
LED8 Output. Current source from VBAT.  
Interrupt Output. Open drain digital output for microcontroller unit, leave  
unconnected if not used.  
D3  
D4  
INT  
Digital Clock Input. Connect a 32kHz signal; if this signal is not available, connect  
this pin to GND.  
CLK32K  
www.austriamicrosystems.com  
Revision 1.3  
5 - 85  
AS3661  
Datasheet - Pinout  
Table 1. Pin Description for AS3661  
Pin Number  
Pin Name  
GND  
Description  
Ground  
D5  
E1  
E2  
E3  
E4  
E5  
LED9 Output. Current source from VBAT.  
General Purpose Output. Leave unconnected if not used.  
Trigger Input. Open drain, connect to ground if not used.  
Serial-Data I/O. Open drain digital I/O I²C data pin.  
Serial-Clock Input  
LED9  
GPO  
TRIG  
SDA  
SCL  
www.austriamicrosystems.com  
Revision 1.3  
6 - 85  
AS3661  
Datasheet - Absolute Maximum Ratings  
5 Absolute Maximum Ratings  
Stresses beyond those listed in Table 2 may cause permanent damage to the device. These are stress ratings only,  
and functional operation of the device at these or any other conditions beyond those indicated in Table 3. Electrical  
Characteristics on page 8 is not implied. Exposure to absolute maximum rating conditions for extended periods may  
affect device reliability.  
Table 2. Absolute Maximum Ratings  
Parameter  
VBAT, VCP, C1+, C1-, C2+, C2- to GND  
VCP to VBAT  
Min  
-0.3  
-0.3  
-0.3  
Max  
Units  
Comments  
+7.0  
V
V
V
Diode between VCP and VBAT  
LED1, LED2....LED9 to GND  
+7.0  
+7.0  
SDA, SCL, EN, CLK32K, TRIG, INT, GPO,  
ASEL0, ASEL1 to GND  
-0.3  
V
Electrostatic Discharge  
ESD HBM (LED1 to LED2)  
8
2.5  
250  
1
kV  
kV  
JEDEC JESD2-A114  
ESD HBM (all other pins)  
ESD MM  
JEDEC JSD22-A115  
JEDEC ESD22-C101  
ESD CDM  
k
Temperature Ranges and Storage Conditions  
Continous Power Dissipation  
Intenally limited (overtemperature  
protection)1  
Junction Temperature (TJMAX  
)
+125  
+125  
+260  
ºC  
ºC  
Storage Temperature Range  
-55  
Body Temperature during Soldering  
Junction to Ambient Thermal Resistane  
(θJA)2  
IPC/JEDEC J-STD-020  
87  
°C/W  
Represents a max. floor life time of  
Moisture Sensitive Level  
unlimited  
Recommended Operating Conditions  
Recommended charge pump load current  
0
100  
mA  
1. Internal thermal shutdown circuitry protects the device from permanent damage. Thermal shutdown engages  
at TJ = 150°C (typ.) and disengages at T = 130°C (typ.).  
2. Junction to ambient thermal resistance ighly application and board-layout dependent. In applications where  
high maximum power dissipation exists, special care must be paid to thermal dissipation issues in board  
design.  
www.austriamicrosystems.com  
Revision 1.3  
7 - 85  
AS3661  
Datasheet - Electrical Characteristics  
6 Electrical Characteristics  
VBAT = 3.6V, VEN = 1.65V, CBAT = CVCPOUT = 1.0µF, CFLY1-2 = 0.47µF, TAMB = -30ºC to +85ºC, typical values @ TAMB =  
+25ºC (unless otherwise specified)1.  
Table 3. Electrical Characteristics  
Symbol  
Parameter  
Condition  
Min  
Typ  
Max  
Unit  
General Operating Conditions  
VBAT  
IVBAT  
Supply Voltage  
2.7  
5.5  
4
V
Standby supply  
current  
EN = 0V or CHIP_EN=0 (bit), external 32 kHz  
clock running or not running  
1.4  
µA  
External 32 kHz clock running, charge pump  
and current source outputs disabled  
0.16 0.22  
0.16 0.22  
1.4  
mA  
mA  
mA  
Normal Mode supply  
current  
Charge pump in 1x mode, no load, current  
source outputs disabled  
Charge pump in 1.5x mode, no load, current  
source outputs disabled  
External 32 kHz clck running  
Internal oscillatr runnig  
TA= +25ºC  
3.1  
5
µA  
Power Save Mode  
supply current  
0.16 0.23  
mA  
-4  
-7  
+4  
+7  
Internal Oscillator  
Frequency Accuracy  
fOSC  
%
°C  
Operating  
TAMB  
-30  
25  
85  
Temperature1  
Charge Pump  
Gain = 1.5 and VBA= 2.9V  
Gain = 1 and VBA= 2.9V  
Gain = 1.5 and BAT = 3.6V  
Gain = VBAT = 3.6V  
6
1
Charge Pump Output  
Resistance  
ROUT  
1.4  
1
fSW  
Switching Frequency  
Ground current  
1.2  
1.25  
1.2  
1
1.3  
MHz  
mA  
µA  
Gain = 1.5  
Gain = 1  
IGND  
VCP Turn-On Time2  
VBAT = 3.6V, IOUT = 60 mA  
tON  
100  
µs  
Charge Pump loa
current  
ILOAD  
Recommended charge pump load current  
0
100  
1
mA  
LED Driver  
LeakagCurrnt  
(LED1 to ED9)  
ILEAK  
IMAX  
PWM = 0%  
0.1  
µA  
Mimum Source  
Current  
Outputs LED1 to LED9  
25.5  
mA  
TAMB = +25ºC -2.5%  
-5  
+2.5%  
+5  
Output Current3  
Accuracy  
Output Current set to 17.5  
mA  
IOUT  
%
IMATCH  
fLED  
Matching  
Output Current set to 17.5 mA  
1
2.5  
%
LED Switching  
Frequency  
312  
Hz  
Saturation Voltage4  
mV  
VSAT  
Output Current set to 17.5 mA  
45  
100  
LED Test  
www.austriamicrosystems.com  
Revision 1.3  
8 - 85  
AS3661  
Datasheet - Electrical Characteristics  
Table 3. Electrical Characteristics (Continued)  
Symbol  
Parameter  
Condition  
Min  
Typ  
Max  
±4  
5
Unit  
LSB  
Least Significant Bit  
30  
mV  
Total Unadjusted  
Error5  
EABS  
VIN_TEST = 0V to VBAT  
<±3  
2.7  
LSB  
tCONV  
Conversion Time  
DC Voltage Range  
ms  
V
VIN_TEST  
0
Logic Interface  
Logic Input EN  
VIL  
VIH  
IIN  
Input Low Level  
Input High Level  
Input Current  
0.5  
1.0  
V
V
1.2  
-1.0  
µA  
Input Delay6  
tDELAY  
2
µs  
V
Logic Input SCL, SDA, TRIG, CLK32K, ASEL0, ASEL1  
0.2x  
VEN  
VIL  
Input Low Level  
0.8x  
VEN  
VIH  
IIN  
Input High Level  
Input Current  
V
-1.0  
1.0  
µA  
Logic Output SDA, TRIG, INT  
VOL  
IL  
Output Low Level  
IOU= 3 mA (pull-up cur)  
VCP = 2.8
0.3  
0.3  
0.5  
1.0  
V
Output Leakage  
Current  
µA  
Logic Output GPO  
VOL  
Output Low Level  
IO= 3 mA  
IO-2 mA  
0.5  
1.0  
V
V
VBAT - VBAT -  
VOH  
Output High Level  
0.5  
0.3  
Output Leakage  
Current  
IL  
VCP = 2.8V  
µA  
Logic Input CLK32K  
fCLK  
fCLKH  
fCLKL  
tR  
Clock Frequency  
32.7  
kHz  
µs  
High Time  
Low Time  
6
6
µs  
Clock Rise ime  
Clock FaTime  
10 to 90%  
90 to 10%  
2
2
µs  
tF  
µs  
1. In applications whre high power dissipation and/or poor package thermal resistance is present, the maximum  
ambient teperature may have to be derated. Maximum ambient temperature (TAmb-MAX) is dependent on the  
maximum oeraing junction temperature (TJ-MAX =125°C), the maximum power dissipation of the devi ce in the  
applicn (PD-MAX) and the junction to ambient thermal resistance of the part/package in the application (θJA) as  
given the following equation: TAmb-MAX = TJ-MAX - (θJA * PD-MAX ).  
2. Trn-on time is measured from the moment the charge pump is activated until the VCP crosses 90% of its target  
value  
1. Low-ESR Surface-Mount Ceramic Capacitors 8MLCCs) used in setting electrical characteris-  
tics.  
www.austriamicrosystems.com  
Revision 1.3  
9 - 85  
AS3661  
Datasheet - Electrical Characteristics  
3. Output current accuracy is the difference between actual value of the output current and programmed value of  
this current. IMATCH is determined as follows:  
For the constant current D1 to D9, the following are determined: The maximum current (max) and the minimum  
current (min), then the IMATCH is calculated with: IMATCH = 100*(((max-min)/2)+((max+min)/2))/((max+min)/2)-  
100  
4. Saturation voltage is defined as the voltage when the LED current has dropped 10% from the value measured  
at VCP - 1V.  
5. Total unadjusted error includes offset, full-scale and linearity errors.  
6. The I2C host should allow at least 500µs before sending data the AS3661after the rising edge of the enable  
line.  
Figure 3. I2C mode Timing Diagram  
SDA  
tBUF  
tLOW  
t:STA  
tR  
tF  
SCL  
tHD:STA  
tSU:STO  
tSU:STA  
tHD:DAT  
tHIGH  
tSU
REPEATED  
START  
STOP START  
.
Table 4. Electrical Characteristics IC1  
Symbol Paramete
I2C mode timings - see Figre 3 on page 10  
Condition  
Min  
Typ  
Max  
Unit  
fSCLK  
SCL Clock Fequency  
0
400  
kHz  
µs  
s Fre Time  
Betwen a STOP and  
START Condition  
tBUF  
1.3  
Hold Time (Repeated)  
START Condition2  
tHD:S
0.6  
µs  
LOW Period of SCL  
Clock  
OW  
tHIGH  
1.3  
0.6  
µs  
µs  
HIGH Period of SCL  
Clock  
www.austriamicrosystems.com  
Revision 1.3  
10 - 85  
AS3661  
Datasheet - Electrical Characteristics  
Table 4. Electrical Characteristics (Continued)I2C1  
Symbol  
Parameter  
Condition  
Min  
Typ  
Max  
Unit  
Setup Time for a  
Repeated START  
Condition  
tSU:STA  
0.6  
µs  
Data Hold Time3  
Data Setup Time4  
tHD:DAT  
tSU:DAT  
tR  
tF  
tSU:STO  
CB  
50  
ns  
ns  
100  
20 +  
0.1CB  
Rise Time of Both  
SDA and SCL Signals  
300  
300  
ns  
ns  
µs  
ns  
pF  
15+  
0.1CB  
Fall Time of Both SDA  
and SCL Signals  
Setup Time for STOP  
Condition  
0.6  
10  
Capacitive Load for  
Each Bus Line  
Load of one Picofarad corresponds to one  
nanosecond.  
20  
10  
I/O Capacitance  
(SDA, SCL)  
CI/O  
1. Specification is guaranteed by design and is not tested production. VEN = 1.65V to VBAT.  
2. After this period the first clock pulse is generated.  
3. A device must internally provide a hold time of at least 30ns for the SDA signal (rferred to the VIHMIN of the  
SCL signal) to bridge the undefined region of the falling edge of SCL.  
4. A fast-mode device can be used in a standard-oe ystem, but the requireent tSU:DAT = to 250ns must then  
be met. This is automatically the case if the dvice does not stretch tLOW period of the SCL signal. If such a  
device does stretch the LOW period of the SCL ignal, it must out the next data bit to the SDA line tR max +  
tSU:DAT = 1000 + 250 = 1250ns before he SL line is release.  
www.austriamicrosystems.com  
Revision 1.3  
11 - 85  
AS3661  
Datasheet - Typical Operating Characteristics  
7 Typical Operating Characteristics  
VBAT = 3.6V, VEN = 1.65V, CBAT = CVCPOUT = 1.0µF, CFLY1-2 = 0.47µF, TAMB = +25ºC, unless otherwise specified  
Figure 4. Charge Pump 1.5 x Efficiency vs. Load  
Figure 5. Output Voltage vs. Load Current (1.5 x CP)  
Figure 6. Gain Change Hysteresis Loop (6x1mA load)  
ure 7. Effect of adaphyst. on width of hyst. loop  
6 x LED Multicomp OVS-601  
6 x LED Multicomp OVS-0601  
Figure 8. LED Current matching istribution @17.5mA  
Figure 9. LED current Accuracy distribution @17.5mA  
Total count: 610 parts  
Total count: 610 parts  
60  
70  
0
0
−1  
0
1
−2  
0
2
%
%
www.austriamicrosystems.com  
Revision 1.3  
12 - 85  
AS3661  
Datasheet - Typical Operating Characteristics  
Figure 10. Power Save Mode Supply Current vs.  
VBAT, Charge Pump in 1x mode  
Figure 11. Serial Bus Write and Charge Pump Start-  
up, ILOAD = 60mA  
200  
internal CLK  
external CLK  
150  
100  
50  
0
2,7  
3,1  
3,5  
3,9  
VBAT [V]  
4,3  
4,7  
5,1  
5,5  
25µs/Div  
Figure 12. Line Trans. and Charge Pump autom. Gain  
Change 1.5 to 1, 6LEDs@1mA 100% PWM  
Figur13. Lie Trans. and Charge Pump autom. Gain  
Cange 1 to 1.5, 6EDs@1mA 100% PWM  
3.6V  
3.6V  
2.8V  
2.8V  
4V  
4.65V  
3.6V  
4.2V  
3.8V  
2.5ms/Div  
2.5ms/Div  
Figure 14. 100% PWM RGB LED fficincy vs. VBAT  
Figure 15. 100% PWM WLED Efficiency vs. VBAT  
3 x LED Osram LRTB Y3SG  
6 x LED Multicomp OVS-0601  
www.austriamicrosystems.com  
Revision 1.3  
13 - 85  
AS3661  
Datasheet - Detailed Description  
8 Detailed Description  
The AS3661 is a fully integrated lighting management unit for producing lighting effects for mobile devices. The  
AS3661 includes all necessary power management, high-side current sources, temperature compensation, two wire  
control interface and programmable pattern generators. The overall maximum current for each driver is set by an 8-bit  
register. The AS3661 controls LED luminance with a pulse width modulation (PWM) scheme with a resolution of 12  
bits. The temperature compensation is also done by a PWM.  
8.1 Programming  
The AS3661 provides flexibility and programmability for dimming and sequencing control. Each LED can be controlled  
directly and independently through the serial bus or LED drivers can be grouped together for pre-programmed flashing  
patterns. The AS3661 has three independent program execution engines, so it is possible to form three independenty  
programmable LED banks. LED drivers can be grouped based on their function so that, for example, the first bank o
drivers can be assigned to the keypad illumination, the second bank to the “funlights” and the third group to the  
indicator LED(s). Each bank can contain 1 to 9 LED driver outputs. Instructions for program execution engines e  
stored in the program memory. The total amount of the program memory is 96 instructions and the user can allocate  
the memory as required by the engines.  
8.2 LED Error Detection  
AS3661 has a built-in LED error detection. Error detection does nt only detect open and shocircu, but provides an  
opportunity to measure the VF’s of the LEDs. The test event is acvated a serial interface write and the result can be  
read through the serial interface during the next cycle. This featucan lso be addressd to easure the voltage on  
VBAT, VCP and INT pins. Typical example usage includes nitoring battery voltage or using INT pin as a light sensor  
interface.  
8.3 Energy Efficiency  
When charge pump automatic mode selection is eabled, the AS3661 monitorthe voltage over the drivers of LED1 to  
LED6 so that the device can select the best charge pump gain and man good efficiency over the whole operating  
voltage range. The red LED element of an RGB ED typically has a forrd voltage of about 2V. For that reason, the  
outputs LED7, LED8 and LED9 are internally owered by VBAT, sincbattery voltage is high enough to drive red LEDs  
over the whole operating voltage range. Tis allows to drive thee RGB LEDs with good efficiency because the red  
LEDs doesn't load the charge pumpA661 is able to automtically enter power-save mode, when LED outputs are  
not active and thus lowering idle curreonsumption doo 10 µA (typ.). During the “downtime” of the PWM cycle  
(constant current output status is low) additional power s can be achieved when the PWM power save feature is  
enabled.  
8.4 Temperature Compensation  
The luminance of an LED is typically a functin of its temperature even though the current flowing through the LED  
remains constant. Since luminance is temeratre dependent, many LED applications require some form of  
temperature compensation to decrease luance and color purity variations due to temperature changes. The  
AS3661 has a build in temperature sensing element and PWM duty cycle of the LED drivers changes linearly in  
relationship to changes in temperureUser can select the slope of the graph (31 slopes) based on the LED  
characteristics. This compensaon can be done either constantly, or only right after when the device wakes up from  
power save mode, to avoid eror due to self-heating of the device. Linear compensation is considered to be practical  
and accurate enough for ost LED applications. Compensation is effective over the temperature range from -40°C to  
+90°C.  
www.austriamicrosystems.com  
Revision 1.3  
14 - 85  
AS3661  
Datasheet - Detailed Description  
Figure 16. Temperature Compensation Principle  
100  
75  
50  
M ax. Slope  
Value  
25  
No  
compensation  
M in. Slope Value  
0
-50  
-25  
0
25  
50  
75  
100  
Temperature [°C]  
Figure 17. AS3661 - Block Diagram  
www.austriamicrosystems.com  
Revision 1.3  
15 - 85  
AS3661  
Datasheet - Detailed Description  
8.5 Modes of Operation  
The following are the different modes of operation of AS3661  
8.5.1 RESET  
In the RESET mode all the internal registers are reset to the default values. Reset is entered always if Reset Register  
(3DH) is written FFH or internal Power On Reset is active. Power On Reset (POR) will activate during the chip startup  
or when the supply voltage VBAT fall below 1.5V (typ.). Once VBAT rises above 1.5V (typ.) POR will be inactivate and  
the chip will continue to the STANDBY mode. CHIP_EN control bit is low after POR by default.  
8.5.2 STANDBY  
The STANDBY mode is entered if the register bit CHIP_EN or EN pin is logic low and Reset is not active. This is the  
low power consumption mode, when all circuit functions are disabled. Registers can be written in this mode if EN pn
logic high so that the control bits will be effective right after the start up.  
8.5.3 STARTUP  
When CHIP_EN bit is written high and the EN pin is high, the INTERNAL STARTUP SEQUENCE powrs up all the  
needed internal blocks (VREF, Bias, Oscillator etc.). Startup delay is 500 µs. If the chip temperature ises oo high, the  
Thermal Shutdown (TSD) disables the chip operation and chip waits in STARTUP mode until no herml shutdown  
event is present.  
8.5.4 NORMAL  
During NORMAL mode the user controls the chip using thontrol Registers.  
8.5.5 POWER SAVE  
In POWER SAVE mode analog blocks are disabled to minimize power consmptin. (see Automatic Power Save  
Mode on page 19)  
Figure 18. Mode Select  
ꢂꢃꢄꢀꢅꢆ+!ꢆ;ꢀꢁꢀ"  
ꢁꢀ"  
;ꢀꢁꢀ"ꢆ;ꢀꢌꢍꢁ"ꢀꢅꢆCꢆ//  
ꢃꢅꢆꢂ+;ꢆCꢆI  
ꢉ"ꢈ!ꢑD)  
'ꢎꢆCꢆꢕꢆ=ꢋꢍ!>ꢆꢃꢅ  
ꢔIꢇꢂ@'ꢎꢆCꢆꢕꢆ=Dꢍ">  
'ꢎꢆCꢆIꢆ=ꢋꢍ!>ꢆꢈ!ꢑ  
ꢔIꢇꢂ@'ꢎꢆCꢆIꢆ=Dꢍ">  
ꢇ!"ꢀꢅ!ꢈ&  
ꢉ"ꢈꢅ"ꢊꢋ  
ꢉꢀ(ꢊꢀ!$ꢀ  
ꢒꢉꢓꢆCꢆI  
ꢒꢉꢓꢆCꢆꢕ  
ꢎꢃꢅꢏꢈ&ꢆꢐꢃꢑꢀ  
'<ꢍ"ꢆꢂꢃꢄꢀꢅꢆꢉꢈ%ꢀ  
'!"ꢀꢅꢆꢋꢃꢄꢀꢅꢆꢉꢈ%ꢀ  
ꢂꢃꢄꢀꢅꢆꢉꢈ%ꢀ  
www.austriamicrosystems.com  
Revision 1.3  
16 - 85  
AS3661  
Datasheet - Detailed Description  
8.6 Charge Pump Operational Description  
8.6.1 Overview  
The AS3661 includes a pre-regulated switched-capacitor charge pump with a programmable voltage multiplication of 1  
and 1.5x. In 1.5x mode by combining the principles of a switched-capacitor charge pump and a linear regulator, it  
generates a regulated 4.5V output from Li-Ion input voltage range. A two-phase non-overlapping clock generated  
internally controls the operation of the charge pump. During the charge phase, both flying capacitors (CFLY1 and CFLY2)  
are charged from input voltage. In the pump phase that follows, the flying capacitors are discharged to output. A  
traditional switched capacitor charge pump operating in this manner will use switches with very low on-resistance,  
ideally 0, to generate an output voltage that is 1.5x the input voltage. The AS3661 regulates the output voltage by  
controlling the resistance of the input-connected pass-transistor switches in the charge pump.  
Figure 19. Charge Pump  
CFLY1  
CFLY2  
C1-  
C2-  
C1+  
C2+  
Low Noise  
Charge Pump  
VBAT  
VBAT  
VCP  
CBAT  
1:1, 1:1.5 Modes  
CVCPOUT  
_max_5V4  
Voltage limit  
V  
5V  
LED1  
LE
up  
down  
Mode  
Switching  
LED9  
8.6.2 Output Resistance  
At lower input voltages, the charge puoutput voltage degrade due to effective output resistance (ROUT) of the  
charge pump. The expected voltage drop can be calculay using a simple model for the charge pump illustrated in  
Figure 20 below.  
Figure 20. Charge Pump Output Resistanc
Rout  
Vcp  
Vin  
V
1.5x V  
REG  
1.5x  
The model showa iner pre-regulation block (REG), a voltage multiplier (1.5x), and an output resistance (ROUT). The  
output resistance mdels the output voltage drop that is inherent to switched capacitor converters. The output  
resistance is .5(typ.), and it is a function of switching frequency, input voltage, flying capacitors’ capacitance value,  
internal resistnceof the switches and ESR of the flying capacitors. When the output voltage is in regulation, the  
regulatohe model controls the voltage V to keep the output voltage equal to 4.5V (typ.). With increased output  
curent, e vltage drop across ROUT increases. To prevent drop in output voltage, the voltage drop across the  
reglator is reduced, V increases, and VCP remains at 4.5V. When the output current increases to the point that there  
is zervoltage drop across the regulator, V equals the input voltage, and the output voltage is “on the edge” of  
regulation. Additional output current causes the output voltage to fall out of regulation, so that the operation is similar to  
a basic open-loop 1.5x charge pump. In this mode, output current results in output voltage drop proportional to the  
output resistance of the charge pump. The out-of-regulation output voltage can be approximated by:  
VCP = 1.5 x VIN – IOUT x ROUT.  
www.austriamicrosystems.com  
Revision 1.3  
17 - 85  
AS3661  
Datasheet - Detailed Description  
8.6.3 Controlling the Charge Pump  
The charge pump is controlled with two CP_MODE bits in MISC register (address 36H). When both of the bits are low,  
the charge pump is disabled and the output voltage is pulled down with an internal 300 k(typ.) resistor. The charge  
pump can be forced to bypass mode, so that the battery voltage is connected directly to the current sources. In 1.5x  
mode the output voltage is boosted to 4.5V. In automatic mode the charge pump operation mode is determined by  
saturation of constant current drivers, like described in chapter LED Forward Voltage Monitoring.  
8.6.4 LED Forward Voltage Monitoring  
When the charge pump automatic mode selection is enabled, the voltages over the LED drivers LED1 to LED6 are  
monitored.  
Note: Power input for current source outputs LED7, LED8 and LED9 are internally connected to the VBAT pin.  
If the LED1 to LED6 drivers do not have enough headroom, the charge pump gain is set to 1.5x. Driver saturaton  
monitor does not have a fixed voltage limit, since saturation voltage is a function of temperature and current. Th
charge pump gain is set to 1x, when the battery voltage is high enough to supply all LEDs. In automatic gain chnge  
mode, the charge pump is switched to bypass mode (1x), when LEDs are inactive for over 50 ms.  
8.6.5 Gain Change Hysteresis  
The charge pump gain control utilizes digital filtering to prevent suply voltage disturbances (exaple, the transient  
voltage on the power supply during the GSM burst) from triggerg unneessary gain changes. ysteresis is provided  
to prevent periodic gain changes, which would occur due to LED iver ad charge pump voltae drop in 1x mode. The  
hysteresis of the gain change is user configurable, defaultting is factory programmable. Flexible configuration  
ensures, that the hysteresis can be minimized or set to deleel in each appation. LED forward voltage  
monitoring and gain control block diagram is shown in Figur21.  
Figure 21. Forward Voltage Monitoring and Gain Control Block  
ꢀꢁꢂꢃꢄꢁꢅꢆꢇꢃ  
ꢈꢉꢊꢋꢌꢇꢃꢍꢎꢏꢐ  
ꢑꢒꢑꢓꢃꢑꢒꢑꢔꢕꢃꢖꢁꢗ
ꢘꢙꢚꢛ  
ꢘꢈꢍ  
ꢀ"#ꢑ  
ꢀ"#$  
ꢍ!ꢖ  
ꢍ!ꢖ  
% ꢑ$ꢃꢜꢅꢞ  
ꢀ"#%  
ꢍ!ꢖ  
,&'  
ꢔꢔꢔ  
ꢈꢁꢏꢐꢊꢋꢊꢞꢁꢋ  
)ꢗꢁꢂ(ꢃ*ꢇꢌꢎꢝꢊꢞꢅꢁ(+  
'ꢊꢞꢎꢋꢊꢞꢅꢁ(ꢃꢖꢁ(ꢅꢞꢁꢋ  
)ꢎꢐꢃ*ꢇꢌꢎꢝꢊꢞꢅꢁ(+  
#ꢅꢌꢅꢞꢊꢝ  
&ꢅꢝꢞꢇꢋ  
ꢈꢁ(ꢞꢋꢁꢝ  
*ꢇꢌꢅꢆꢞꢇꢋꢆ  
ꢖꢁꢗꢇ  
ꢈꢁ(ꢞꢋꢁꢝ  
ꢈꢁꢋꢇꢃꢀꢁꢌꢅ-  
www.austriamicrosystems.com  
Revision 1.3  
18 - 85  
AS3661  
Datasheet - Detailed Description  
8.6.6 Automatic Power Save Mode  
Automatic power save mode is enabled when POWERSAVE_EN bit in register address 36H is ‘1’. Almost all analog  
blocks are powered down in power save, if an external clock signal is used. Only the charge pump protection circuits  
remain active. However, if the internal clock has been selected, only charge pump and LED drivers are disabled during  
the power save; the digital part of the LED controller needs stay active. In both cases the charge pump enters to the  
weak 1x mode. In this mode the charge pump utilizes a passive current limited keep-alive switch, which keeps the  
output voltage at the battery level. During the program execution AS3661 can enter power save if there is no PWM  
activity in any of the LED driver outputs. To prevent short power save sequences during program execution, AS3661  
has an instruction look-ahead filter. During program execution engine 1, engine 2 and engine 3 instructions are  
constantly analyzed, and if there is time intervals of more than 50ms in length with no PWM activity on LED driver  
outputs, the device will enter power save. In power save mode program execution continues uninterruptedly. When an  
instruction that requires PWM activity is executed, a fast internal startup sequence will be started automatically.  
8.6.7 PWM Power Save Mode  
PWM cycle power save mode is enabled when register 36 bit [2] PWM_PS_EN is set to '1'. In PWM power save ode  
analog blocks are powered down during the "down time" of the PWM cycle. Blocks that are powered down depends  
whether external or internal clock is used. While the Automatic Power Save Mode (see above) saes eergy when  
there is no PWM activity at all, the PWM Power Save mode saves energy during PWM cycles. Like te Automatic  
Power Save Mode, PWM Power Save Mode works also during program execution.  
Figure 22. PWM Powersave Principle with external clock (VDD =3.6V, 0% PWM, ILED9=5mA)  
INPUT CURRENT ~3
DURING PWM POWES
1ms/Div  
www.austriamicrosystems.com  
Revision 1.3  
19 - 85  
AS3661  
Datasheet - Detailed Description  
8.7 LED Driver Operational Description  
AS3661 LED drivers are constant current sources. The output current can be programmed by control registers up to  
25.5 mA. The overall maximum current is set by 8-bit output current control registers with 100 µA step size. Each of the  
9 LED drivers has a separate output current control register. The LED luminance pattern (dimming) is controlled with  
PWM (pulse width modulation) technique, which has internal resolution of 12 bits (8-bit control can be seen by user).  
PWM frequency is 312 Hz (see Figure 23 on page 20).  
Figure 23. LED Pattern and Current Control Principle  
LED dimming is controlled according to a logarithmic or lineascale(see Figue 2). Logarithmic or linear scheme can  
be set for both the program execution engine contol and direct PWM control.  
Figure 24. Logarithmic vs. Linear Dimming  
100  
95  
linear PWM  
90  
logarithmic PWM  
85  
8
75  
70  
65  
60  
55  
50  
45  
40  
35  
30  
25  
20  
15  
10  
5
0
0
64  
128  
192  
256  
Dimming Control [DEC]  
Note: If the emperature compensation is active, the maximum PWM duty cycle is limited to 50% at +25°C. This is  
requireto allow enough headroom for temperature compensation over the whole temperature range -40 °C to  
.  
www.austriamicrosystems.com  
Revision 1.3  
20 - 85  
AS3661  
Datasheet - Detailed Description  
8.7.1 Powering LEDs  
Although the AS3661 is very suitable for white LED and general purpose applications, it is particularly well suited to  
use with RGB LEDs. The AS3661 architecture is optimized for use with three RGB LEDs. Typically, the red LEDs have  
forward voltages below 2V and thus red LEDs can be powered directly from VBAT. In AS3661 the LED7, LED8 and  
LED9 drivers are directly powered from the battery voltage (VBAT), not from the charge pump output. The LED1 to  
LED6 drivers are internally connected to the charge pump output and these outputs can be used for driving green and  
blue (VF = 2.7V to 3.7V) or white LEDs. Of course, LED7, LED8 and LED9 outputs can be used for green, blue or white  
LEDs if the VBAT voltage is high enough. An RGB LED configuration example is given in the Typical Applications  
section.  
8.7.2 Controlling the High-side LED Drivers  
Direct PWM Control  
All AS3661 LED drivers, LED1 to LED9, can be controlled independently through the two-wire serial I²C cmpa
ble interface. For each high-side driver there is a PWM control register. Direct PWM control is active by defult.  
Controlling by Program Execution Engines  
Engine control is used when the user wants to create programmed sequences. The program ecutin engine has  
higher priority than direct control registers. Therefore if the user has set to PWM register a certaivalue it will be  
automatically overridden when the program execution engine controls the driver. LED cnrol nd program execu-  
tion engine operation is described in the chapter Control Reister etails.  
Master Fader Control  
In addition to LED-by-LED PWM register control, the 661 is equipped with so called master fader control,  
which allows the user to fade in or fade out multiple LEy writing to only oregister. This is an useful function  
to minimize serial bus traffic between the MCU and the S3661. The AS361 hahree master fader registers, so  
it is possible to form three master fader groups. Master fader control cabe ued with the engines as well.  
www.austriamicrosystems.com  
Revision 1.3  
21 - 85  
AS3661  
Datasheet - Detailed Description  
8.8 I2C Compatible Control Interface  
The AS3661 supports the I2C bus protocol. A device that sends data onto the bus is defined as a transmitter and a  
device receiving data as a receiver. The device that controls the message is called a master. The devices that are  
controlled by the master are referred to as slaves. A master device that generates the serial clock (SCL), controls the  
bus access, and generates the START and STOP conditions must control the bus. The AS3661 operates as a slave on  
the I2C bus. Within the bus specifications a standard mode (100kHz maximum clock rate) and a fast mode (400kHz  
maximum clock rate) are defined. The AS3661 works in both modes. Connections to the bus are made through the  
open-drain I/O lines SDA and SCLTable 5  
8.8.1 I2C Address selection  
The slave address can be selected depending on the connection of the two address selection pins ASEL0 and ASEL
The selected address for reading and writing depending on the state of ASEL0 and ASEL1 can be found inTable 5  
below.  
Table 5. Chip Address Configuration  
Address  
(Hex)  
32  
8 biHex Address  
ASEL1  
ASEL0  
/W  
64/65  
66/67  
68/69  
6A/6B  
GND  
GND  
VEN  
GND  
VEN  
33  
GND  
VEN  
34  
VEN  
35  
The following bus protocol has been defined (Figue 25):  
Data transfer may be initiated only when the bus is not busy.  
During data transfer, the data line must rmaistable whenevthe lock line is HIGH. Changes in the data line  
while the clock line is HIGH are interpeted as control signals.  
Accordingly, the following bus conditios hae been defined:  
8.8.2 Bus Not Busy  
Both data and clock lines remain HIGH.  
8.8.3 Start Data Transfer  
A change in the state of the data line, from HGH to LOW, while the clock is HIGH, defines a START condition.  
8.8.4 Stop Data Transfer  
A change in the state of the data lie, from LOW to HIGH, while the clock line is HIGH, defines the STOP condition.  
8.8.5 Data Valid  
The state of the data line reprsents valid data when, after a START condition, the data line is stable for the duration of  
the HIGH period of the clck signal. The data on the line must be changed during the LOW period of the clock signal.  
There is one clok pulsper bit of data.  
Each data transfer is initiated with a START condition and terminated with a STOP condition. The number of data bytes  
transferred beween START and STOP conditions are not limited, and are determined by the master device. The  
information is anserred byte-wise and each receiver acknowledges with a ninth bit.  
8.6 Aknowledge  
Eacreceiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. The  
master device must generate an extra clock pulse that is associated with this acknowledge bit.  
www.austriamicrosystems.com  
Revision 1.3  
22 - 85  
AS3661  
Datasheet - Detailed Description  
A device that acknowledges must pull down the SDA line during the acknowledge clock pulse in such a way that the  
SDA line is stable LOW during the HIGH period of the acknowledge-related clock pulse. Of course, setup and hold  
times must be taken into account. A master must signal an end of data to the slave by not generating an acknowledge  
bit on the last byte that has been clocked out of the slave. In this case, the slave must leave the data line HIGH to  
enable the master to generate the STOP condition.  
Figure 25. Data Transfer on I2C Serial Bus  
SDA  
MSB  
SLAVE  
ADDRESS  
R/W  
DIRECTION  
BIT  
ACKNOWLEDGEMENT  
SIGNAL FROM  
RECEIVER  
ACKNOWLEDGEMENT  
SIGNAL FROM  
RECEIVE
SCL  
1
9
1
2
6
7
8
2
3-8  
8
9
ACK  
STOP CONDITION  
OR REPEATED  
START CONDITION  
START  
CONDITION  
REPEAD IF  
MORE BYTEARE  
TRNSERRED  
Depending upon the state of the R/W bit, twtypeof data transfere possible:  
1. Data transfer from a master trasmiter to a slave reciver. The first byte transmitted by the master is the  
slave address. Next follows a nmbr of data bytes. Te slae returns an acknowledge bit after each received  
byte. Data is transferred with tmost significant bit (MB) first.  
2. Data transfer from a slave transmitter to a meceiver. The master transmits the first byte (the slave  
address). The slave then returns an acknowledge bit, followed by the slave transmitting a number of data  
bytes. The master returns an acknowledgbit aer all received bytes other than the last byte. At the end of the  
last received byte, a “not acknowledge” is returned. The master device generates all of the serial clock pulses  
and the START and STOP condition. A transfer is ended with a STOP condition or with a repeated START  
condition. Since a repeated STARcondition is also the beginning of the next serial transfer, the bus is not  
released. Data is transferred with most significant bit (MSB) first.  
The AS3661 can operate in the foowing two modes:  
1. Slave Receiver Mode (Wrte Mode): Serial data and clock are received through SDA and SCL. After each  
byte is received an acknwledge bit is transmitted. START and STOP conditions are recognized as the begin-  
ning and end of a seril transfer. Address recognition is performed by hardware after reception of the slave  
address and direcon bit (see Figure 26). The slave address byte is the first byte received after the master  
generatete START condition. The slave address byte contains the 7-bit AS3661 address, which is  
01100102, foowed by the direction bit (R/W), which, for a write, is 0.3 After receiving and decoding the slave  
address bye the device outputs an acknowledge on the SDA line. After the AS3661 acknowledges the slave  
addres+ write bit, the master transmits a register address to the AS3661. This sets the register pointer on the  
3661. The master may then transmit zero or more bytes of data (if more than one data byte is written see  
ao Blockwrite/read boundaries on page 24), with the AS3661 acknowledging each byte received. The  
2. ’XXX’ depends on the external connection of ASEL0 and ASEL1; see Chip Address Configuration on page  
22  
3. The address for writing to the AS3661 is 8Xh = 01100100b - see Table 5  
www.austriamicrosystems.com  
Revision 1.3  
23 - 85  
AS3661  
Datasheet - Detailed Description  
address pointer will increment after each data byte is transferred. The master generates a STOP condition to  
terminate the data write.  
2. Slave Transmitter Mode (Read Mode): The first byte is received and handled as in the slave receiver mode.  
However, in this mode, the direction bit indicates that the transfer direction is reversed. Serial data is transmit-  
ted on SDA by the AS3661 while the serial clock is input on SCL. START and STOP conditions are recognized  
as the beginning and end of a serial transfer (Figure 26 and Figure 27). The slave address byte is the first byte  
received after the master generates a START condition. The slave address byte contains the 7-bit AS3661  
address, which is 0110010, followed by the direction bit (R/W), which, for a read, is 1.4 After receiving and  
decoding the slave address byte the device outputs an acknowledge on the SDA line. The AS3661 then  
begins to transmit data starting with the register address pointed to by the register pointer (if more than one  
data byte is read see also Blockwrite/read boundaries on page 24). If the register pointer is not written to  
before the initiation of a read mode the first address that is read is the last one stored in the register pointr.  
The AS3661 must receive a “not acknowledge” to end a read.  
Figure 26. Data Write - Slave Receiver Mode  
<Data(n+X
XXXXXXX  
<Slave Address>  
0110010  
<Word Address (n)>  
XXXXXXXX  
<Data(n)>  
<Data(1)>  
XXXXXX  
S
0
A
A
XXXXXX
A
A
A
P
S - Start  
A - Acknowledge (ACK)  
P - Stop  
Data Transferre
(X + 1 Bytes + Acknoedge)  
Figure 27. Data Read (Write Pointer, en Read) - Slaveive and Transmit  
Word Address (n)>  
XXXXXXX  
<Slave Address>  
1
A
S
0110010  
0
A
Sr  
0110010  
<ata(n+1)>  
XXXXXXXX  
<Data(n+2)>  
XXXXXXXX  
<Data(n+X)>  
XXXXXXXX  
<Data(n)>  
XXXXXXXX  
A
A
A
NA  
P
S - tart  
S- Reated Start  
Acknwledge (ACK)  
P - top  
Data Transferred  
(X + 1 Bytes + Acknowledge)  
Note: Last data byte is followed by a NACK  
NA -Not Acknowledge (NACK)  
4. The address for read mode from the AS3661 is 8Xh+1 = 01100101b - see Table 5  
www.austriamicrosystems.com  
Revision 1.3  
24 - 85  
AS3661  
Datasheet - Detailed Description  
8.8.7 Program Downloading  
First the register page_select is set to the program page, which should be accessed. Then the program page (part of or  
full page) can be downloaded to the registers Cmd_0_MSB, Cmd_0_LSB, Cmd_1_MSB, Cmd_1_LSB...Cmd_F_MSB,  
Cmd_F_LSB (I2C registers area 50h to 6Fh).  
Table 6. Page_Select Register  
Addr: 4Fh  
Bit Name  
Page_Select Register  
Description  
Bit  
Default Access  
Selects program page for download  
page 0 - Addr 00h-0Fh  
page 1 - Addr 10h-1Fh  
page 2 - Addr 20h-2Fh  
page 3 - Addr 30h-3Fh  
page 4 - Addr 40h-4Fh  
page 5 - Addr 50h5Fh  
don’t use  
000  
001  
010  
011  
100  
101  
110  
111  
page_select  
2:0  
000b  
R/W  
don’t us
8.9 Register Set  
The AS3661 is controlled by a set of registers through the twwire serial intefacport. Some register bits are  
reserved for future use. Table below lists device registers, their addresses antheir abbreviations. A more detailed  
description is given in chapter Control Register Details.  
Table 7. Description of Registers  
Default Vue  
After eset  
Hex  
Address  
Register Name  
Bit(s)  
Type  
Description  
CHIP_EN  
[6]  
xxxxxx  
0
1
AS3661 not enabled  
AS3661 enabled  
ENGINE1_EXEC  
Engine 1 program execution control  
ENABLE / ENGINE  
CNTRL1  
[5:4]  
[3:2]  
[1:0]  
[5:4]  
[3:2]  
[1:0]  
xx00xxxx  
xxxx00xx  
xxxxxx00  
xx00xxxx  
xxxx00xx  
xxxxxx00  
00  
/W  
ENGINE2_EXEC  
Engine 2 program execution control  
ENGINE3_EXEC  
Engine 3 program execution control  
ENGINE1_MODE  
ENGINE 1 mode control  
ENGINE2_MODE  
ENGINE 2 mode control  
01  
2  
ENGINCNTRL2  
R/W  
R/W  
ENGINE3_MODE  
ENGINE 3 mode control  
OUTPUT DIRECT/  
RATIOMETRIC  
MSB  
LED9_RATIO_EN  
Enables ratiometric dimming for LED9 output  
[0]  
xxxxxxx0  
www.austriamicrosystems.com  
Revision 1.3  
25 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[7]  
[6]  
[5]  
[4]  
[3]  
[2]  
[1]  
[0]  
[0]  
[7]  
[6]  
[5]  
[4
[3]  
[2]  
[1]  
Type  
Description  
LED8_RATIO_EN  
Enables ratiometric dimming for LED8 output  
0xxxxxxx  
x0xxxxxx  
xx0xxxxx  
xxx0xxxx  
xxxx0xxx  
xxxxx0xx  
xxxxxx0x  
xxxxxx0  
xxx1  
1xxxxxxx  
x1xxxxx
xx1xxxxx  
xxxx  
xxxx1xxx  
xxxxx1xx  
xxxxxx1x  
LED7_RATIO_EN  
Enables ratiometric dimming for LED7 output  
LED6_RATIO_EN  
Enables ratiometric dimming for LED6 outpu
LED5_RATIO_EN  
Enables ratiometric dimming for LED5 oupu
OUTPUT DIRECT/  
03  
R/W  
RATIOMETRIC LSB  
LED4_RATIO_EN  
Enables ratiometric dimming for LED4 otput  
LED3_RATIO_N  
Enables ratiometric dimmig for LED3 output  
LED2_RATO_E
Enables ratiometric mminfor LED2 output  
LED1_RATIO_EN  
Enables ratiomeric dmming for LED1 output  
OUTPUT ON/OFF  
04  
R/W  
LED9_ON  
ON/OFF Control for LED9 output  
CONTROL MSB  
LED8_ON  
ON/OFF Control for LED8 output  
LED7_ON  
ON/OFF Control for LED7 output  
LED6_ON  
ON/OFF Control for LED6 output  
LED5_ON  
ON/OFF Control for LED5 output  
OUTPUT ON / OFF  
CONTROL LSB  
05  
R/W  
LED4_ON  
ON/OFF Control for LED4 output  
LED3_ON  
ON/OFF Control for LED3 output  
LED2_ON  
ON/OFF Control for LED2 output  
LED1_ON  
ON/OFF Control for LED1 output  
[0]  
[7:6]  
[5]  
xxxxxxx1  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED1 output  
LOG_EN  
Logarithmic dimming control for LED1  
06  
07  
LED1 CONTROL  
LED2 CONTROL  
R/W  
R/W  
TEMP COMP  
Temperature compensation control for LED1  
output  
[4:0]  
xxx00000  
[7:6]  
[5]  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED2 output  
LOG_EN  
Logarithmic dimming control for LED2 output  
TEMP COMP  
Temperature compensation control for LED2  
output  
[4:0]  
xxx00000  
www.austriamicrosystems.com  
Revision 1.3  
26 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[7:6]  
[5]  
Type  
Description  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED3 output  
LOG_EN  
R/W  
Logarithmic dimming control for LED3 output  
08  
09  
0A  
0B  
0C  
0D  
0E  
LED3 CONTROL  
LED4 CONTROL  
LED5 CONTROL  
LED6 CONTROL  
LED7 CONTROL  
LED8 CONTROL  
LD9 CONTROL  
TEMP COMP  
Temperature compensation control for LED3  
output  
[4:0]  
xxx00000  
[7:6]  
[5]  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED4 output  
LOG_EN  
R/W  
R/W  
R/W  
R/W  
R/W  
R/W  
Logarithmic dimming control for LED4 utp
TEMP COMP  
Temperature compensation ontrol for LED4  
output  
[4:0]  
xxx00000  
[7:6]  
[5]  
00xxxxxx  
xx0xxxx  
MAPPING Mapping or LD5 output  
LOG_EN  
ogarithmic dimming cotrol for LED5 output  
TEMP COMP  
Temperture compensation control for LED5  
output  
[4:0]  
x00  
[7:6]  
[5]  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED6 output  
LOG_EN  
garithmic dimming control for LED6 output  
TEMP COMP  
Temperature compensation control for LED6  
output  
[4:0]  
xxx0000  
[7
[5]  
xxxxx  
0xxxxx  
MAPPING Mapping for LED7 output  
LOG_EN  
Logarithmic dimming control for LED7 output  
TEMP COMP  
Temperature compensation control for LED7  
output  
[4:0]  
xxx00000  
[7:6]  
[5]  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED8 output  
LOG_EN  
Logarithmic dimming control for LED8 output  
TEMP COMP  
Temperature compensation control for LED8  
output  
[4:0]  
xxx00000  
[7:6]  
[5]  
00xxxxxx  
xx0xxxxx  
MAPPING Mapping for LED9 output  
LOG_EN  
Logarithmic dimming control for LED9 output  
TEMP COMP  
Temperature compensation control for LED9  
output  
[4:0]  
xxx00000  
0F to 15  
16  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
reserved  
LED1 PWM  
LED2 PWM  
LED3 PWM  
R/W  
R/W  
R/W  
00000000  
00000000  
00000000  
PWM duty cycle control for LED1  
PWM duty cycle control for LED2  
PWM duty cycle control for LED3  
17  
18  
www.austriamicrosystems.com  
Revision 1.3  
27 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
Type  
Description  
19  
1A  
LED4 PWM  
LED5 PWM  
LED6 PWM  
LED7 PWM  
LED8 PWM  
LED9 PWM  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
R/W  
R/W  
R/W  
R/W  
R/W  
R/W  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
PWM duty cycle control for LED4  
PWM duty cycle control for LED5  
PWM duty cycle control for LED6  
PWM duty cycle control for LED7  
PWM duty cycle control for LED8  
PWM duty cycle control for LED9  
reserved  
1B  
1C  
1D  
1E  
1F to 25  
CURRENT  
LED1 output current control register.  
Default 17.5 mA (tp.)  
LED1 CURRENT  
CONTROL  
26  
27  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
7:
[7:0]  
[7:0]  
R/W  
R/W  
R/W  
R/W  
R/
R/W  
R/W  
RW  
R/W  
10101111  
10101111  
10101111  
10101111  
1010111
1010111  
10101111  
10101111  
10101111  
CURRENT  
LED2 output current ontrl register.  
Default 15 mA (typ.)  
LED2 CURRENT  
CONTROL  
CURRENT  
LED3 output currnt control register.  
Default 17.5 mA (typ.)  
LED3 CURRENT  
CONTROL  
28  
CURRENT  
LEDoutput current control register.  
Default 17.5 mA (typ.)  
LED4 CURRENT  
CONTROL  
29  
CURRENT  
LED5 output current control register.  
Default 17.5 mA (typ.)  
LED5 CURRENT  
CONTROL  
2A  
CURRENT  
LED6 output current control register.  
Default 17.5 mA (typ.)  
LED6 CURRENT  
CONTROL  
2B  
CURRENT  
LED7 output current control register.  
Default 17.5 mA (typ.)  
LED7 CURRENT  
CONTROL  
2C  
0x2D  
CURRENT  
LED8 output current control register.  
Default 17.5 mA (typ.)  
LED8 CURRENT  
CONTROL  
CURRENT  
LED9 output current control register.  
Default 17.5 mA (typ.)  
LED9 CURRENT  
CONTROL  
0x2E  
[7:0
[7:0]  
2F to 35  
reserved  
www.austriamicrosystems.com  
Revision 1.3  
28 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[7]  
Type  
Description  
VARIABLE_D_SEL  
Variable LED source selection  
0xxxxxxx  
x1xxxxxx  
xx0xxxxx  
xxx00xxx  
xxxxx0xx  
xxxxxx0x  
xxxxxxx0  
EN_AUTO_INCR  
Serial bus address auto increment enable  
[6]  
POWERSAVE_EN  
Powersave mode enable  
[5]  
CP_MODE  
Charge pump gain selection  
36  
MISC  
[4:3]  
[2]  
R/W  
PWM_PS_EN  
PWM cycle powersave enable  
CLK_DET_E
External clock dtectn  
[1]  
INT_CLKEN  
Clock soe seection  
[0]  
37  
38  
39  
ENGINE1 PC  
ENGINE2 PC  
ENGINE3 PC  
[6:0]  
[6:0]  
[6:0]  
R/W  
R/W  
R/W  
x000000  
000000  
x0000  
PC Program counter for engine 1  
PC Program counter for engine 2  
PC rogram counter for engine 3  
LEDTEST_MEAS_DONE  
Indictes when the LED test measurement is  
done.  
[7]  
[6]  
[
[4]  
0xxxxxxx  
x1xxxxxx  
xxxxx  
xxx0xxxx  
MASK_BUSY  
Mask bit for interrupts generated by  
STARTUP_BUSY or ENGINE_BUSY  
STARTUP_BUSY  
This bit indicates that the start-up sequence  
is running  
ENGINE_BUSY  
STATUS /  
INTERRUPT  
3A  
R
This bit indicates that a program execution  
engine is clearing internal registers  
EXT_CLK_USED  
Indicates when external clock signal is in use  
[3]  
[2]  
[1]  
[0]  
xxxx0xxx  
xxxxx0xx  
xxxxxx0x  
xxxxxxx0  
ENG1_INT  
Interrupt bit for program execution engine 1  
ENG2_INT  
Interrupt bit for program execution engine 2  
ENG3_INT  
Interrupt bit for program execution engine 3  
INT_CONF  
INT pin can be configured to function as a  
GPO with this bit  
[2]  
[1]  
[0]  
xxxxx0xx  
xxxxxx0x  
xxxxxxx0  
3B  
3C  
GPO  
R/W  
R/W  
GPO pin control  
INT_GPO  
GPO pin control for INT pin (when  
INT_CONF is set "1")  
VARIABLE  
Global 8-bit variable  
VARIABLE  
[7:0]  
00000000  
www.austriamicrosystems.com  
Revision 1.3  
29 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
Type  
Description  
RESET  
Writing 11111111 into this register resets the  
AS3661  
3D  
RESET  
[7:0]  
R/W  
00000011  
TEMP_MEAS_BUSY  
Indicates when temperature measurement is  
active  
[7]  
[2]  
[1]  
R
0xxxxxxx  
xxxxx0xx  
xxxxxx0x  
EN_TEMP_SENSOR  
Reads the internal temperature sensor onc
TEMP ADC  
CONTROL  
3E  
CONTINUOUS_CONV  
Continuous temperature measuremnt  
selection  
R/W  
SEL_EXT_TEMP  
Internal/external tempratursensor  
selection  
[0]  
xxxxxxx0  
TEMPRATURE  
Bits for temperatre information  
TEMPERATURE  
READ  
3F  
40  
[7:0]  
[7:0]  
R
0001101  
000000  
TMPERATURE  
Bits for temperature information  
TEMPERATURE  
WRITE  
R/W  
[7]  
[6]  
0xxxxx  
x0xxxxxx  
EN_LED_TEST_ADC  
EN_LED_TEST_INT  
LED TEST  
CONTROL  
CONTINUOUS_CONV  
onnuous LED test measurement selection  
41  
42  
R/W  
R
[5]  
xx0xxxxx  
xxx00000  
N/A  
LED_TEST_CTRL  
Control bits for LED test  
[4:0]  
[7:
LED_TEST_ADC  
LED test result  
LED TEST ADC  
43  
44  
[7:0]  
[7:0]  
reserved  
reserved  
ENGINE1  
45  
46  
47  
[7:0]  
[7:0]  
7:0]  
R
R
R
00000000  
00000000  
00000000  
VARIABLE FOR ENGINE1  
VARIABLE FOR ENGINE2  
VARIABLE FOR ENGINE3  
VARIABLE A  
ENGINE2  
VARIABLE A  
ENGINE3  
VARIABLE A  
48  
49  
4A  
4B  
MASTER FADER
MASTER FADR2  
MASTR FADER3  
[7:0]  
[7:0]  
[7:0]  
[7:0]  
R/W  
R/W  
R/W  
00000000  
00000000  
00000000  
MASTER FADER 1  
MASTER FADER 2  
MASTER FADER 3  
reserved  
ENG1 PROG  
START ADDR  
4C  
D  
4E  
4F  
[6:0]  
[6:0]  
[6:0]  
[2:0]  
R/W  
R/W  
R/W  
R/W  
x0000000  
x0001000  
x0010000  
xxxxx000  
Engine 1 program start address  
Engine 2 program start address  
Engine 3 program start address  
PAGE_SEL  
ENG2 PROG  
START ADDR  
ENG3 PROG  
START ADDR  
PROG MEM PAGE  
SEL  
www.austriamicrosystems.com  
Revision 1.3  
30 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[15:8]  
[7:0]  
Type  
Description  
50  
51  
52  
53  
54  
55  
56  
57  
PROGRAM  
MEMORY  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
R/W  
00H/10H/20H/30H/  
40H/50H  
CMD  
Every Instruction is 16–bit width. The  
AS3661 can store 96 instructions. Each  
instruction consists of 16 bits. Because one  
register has only 8 bits, one instruction  
requires two register addresses. In order to  
reduce program load time the AS3661  
supports address auto-incrementation.  
Register address is incremented after each
data bits. Thus the whole program meory  
page can be written in one serial bus write  
sequence.  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
R/W  
R/W  
R/W  
01H/11H/21H/31H/  
41H/51H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
02H/12H/22H/32H/  
42H/52H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
03H/13H/23H/33H/  
43H/53H  
www.austriamicrosystems.com  
Revision 1.3  
31 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[15:8]  
[7:0]  
Type  
Description  
58  
59  
5A  
5B  
5C  
5D  
5E  
5F  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
6A  
6B  
6C  
6D  
6E  
6F  
PROGRAM  
MEMORY  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
0000000  
000000  
000000  
00000000  
0000000
000000
0000  
0000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
00000000  
R/W  
04H/14H/24H/34H/  
44H/54H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
R/W  
R/W  
R/W  
R/W  
R/W  
/W  
R/W  
R/W  
R/W  
R/W  
R/W  
05H/15H/25H/35H/  
45H/55H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
06H/16H/26H/36H/  
46H/56H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
07H/17H/27H/37H/  
47H/57H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
08H/18H/28H/38H/  
48H/58H  
CMD  
Every struction is 16–bit width. The  
AS361 cstore 96 instructions. Each  
instuctioconsists of 16 bits. Because one  
reister has only 8 bits, one instruction  
quires two register addresses. In order to  
rduce program load time the AS3661  
supports address auto-incrementation.  
Register address is incremented after each 8  
data bits. Thus the whole program memory  
page can be written in one serial bus write  
sequence.  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
09H/19H/29H/39H/  
49H/59H  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
0AH/1AH/2AH/3AH/  
4AH/5AH  
PROGRAM  
MEMORY  
[15
[7:0]  
0BH/1BH/2BH/3BH/  
4BH/5BH  
PROGRAM  
MEMORY  
0CH/1CH/2CH/  
3CH/4CH/5CH  
[15:8]  
[7:0]  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
0DH/1DH/2DH/36D/  
46D/5DH  
PROGRM  
MEMORY  
[15:8]  
[7:0]  
0EH/EH/2EH/3EH/  
4E/5EH  
PROGRAM  
MEMORY  
[15:8]  
[7:0]  
0FH/1FH/2FH/3FH/  
4FH/5FH  
GPO  
[7]  
[0]  
0xxxxxxx  
xxxxxxx0  
Engine 1 mapping information, GPO pin  
ENG1 MAPPING  
MSB  
70  
R
D9  
Engine 1 mapping information, D9 output  
www.austriamicrosystems.com  
Revision 1.3  
32 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[7]  
[6]  
[5]  
[4]  
[3]  
[2]  
[1]  
[0]  
[7]  
[0]  
[7]  
[6]  
[5
[4]  
[3]  
[2]  
[1]  
[0]  
[7]  
[0]  
Type  
Description  
LED8  
0xxxxxxx  
x0xxxxxx  
xx0xxxxx  
xxx0xxxx  
xxxx0xxx  
xxxxx0xx  
xxxxxx0x  
xxxxxx0  
0xxx  
xxxxxxx0  
0xxxxxx
x0xxxxxx  
xxxx  
xxx0xxxx  
xxxx0xxx  
xxxxx0xx  
xxxxxx0x  
xxxxxxx0  
0xxxxxxx  
xxxxxxx0  
Engine 1 mapping information, LED8 output  
LED7  
Engine 1 mapping information, LED7 output  
LED6  
Engine 1 mapping information, LED6 output  
LED5  
Engine 1 mapping information, LED5 oupu
ENG1 MAPPING  
71  
R
LSB  
LED4  
Engine 1 mapping information, LED4 otput  
LED3  
Engine 1 mapping informion, ED3 output  
LED
Engine 1 mapping irmaon, LED2 output  
LED1  
Engine 1 mappinrmation, LED1 output  
GPO  
Engine 2 mapping information, GPO pin  
ENG2 MAPPING  
72  
R
R
R
MSB  
LED9  
Engne 2 mapping information, D9 output  
LED8  
Engine 2 mapping information, LED8 output  
LED7  
Engine 2 mapping information, LED7 output  
LED6  
Engine 2 mapping information, LED6 output  
LED5  
Engine 2 mapping information, LED5 output  
ENG2 MAPPING  
73  
LSB  
LED4  
Engine 2 mapping information, LED4 output  
LED3  
Engine 2 mapping information, LED3 output  
LED2  
Engine 2 mapping information, LED2 output  
LED1  
Engine 2 mapping information, LED1 output  
GPO  
Engine 3 mapping information, GPO pin  
NG3 MAPPING  
74  
MSB  
LED9  
Engine 3 mapping information, LED9 output  
www.austriamicrosystems.com  
Revision 1.3  
33 - 85  
AS3661  
Datasheet - Detailed Description  
Table 7. Description of Registers  
Default Value  
After Reset  
Hex  
Register Name  
Address  
Bit(s)  
[7]  
Type  
Description  
LED8  
0xxxxxxx  
x0xxxxxx  
xx0xxxxx  
xxx0xxxx  
xxxx0xxx  
xxxxx0xx  
xxxxxx0
xxxxxxx
Engine 3 mapping information, LED8 output  
LED7  
[6]  
Engine 3 mapping information, LED7 output  
LED6  
[5]  
Engine 3 mapping information, LED6 output  
LED5  
[4]  
Engine 3 mapping information, LED5 outpu
ENG3 MAPPING  
75  
R
LSB  
LED4  
[3]  
Engine 3 mapping information, LED4 oput  
LED3  
[2]  
Engine 3 mapping informaon,LD3 output  
ED2  
[1]  
Engine 3 mapping infrmation, LED2 output  
LED1  
[0]  
Engine 3 mapping inormation, LED1 output  
TRESHOLD  
Treshold voltage (typ.)  
00  
1  
10  
11  
400mV  
300mV  
200mV  
100mV  
[7:6]  
R/W  
00xxxxxx  
ADAPTIVE_TRESH_EN  
Activates adaptive threshold.  
[5
[4:3]  
[2
R/W  
R/W  
R/W  
x0xxxx  
xxx00xxx  
xxxxx0xx  
GAIN CHANGE  
76  
CTRL  
TIMER  
5ms  
00  
01  
10  
11  
10ms  
50ms  
Infinite  
FORCE_1x  
Activates 1.5x to 1x timer  
www.austriamicrosystems.com  
Revision 1.3  
34 - 85  
AS3661  
Datasheet - Detailed Description  
8.10 Control Register Details  
8.10.1 ENABLE/ ENGINE CONTROL1  
This register controls the startup of the chip and the program execution modes for each program execution engine.  
Table 8. ENABLE / ENGINE CNTR 1 Register  
Register: 0x00  
Bit Name  
ENABLE / ENGINE CNTR1  
Bit Description  
Bit  
Default  
Access  
6
CHIP_EN  
0: Standby mode is entered. Still, control registers can be  
written or read, excluding bits [5:0] in reg 00 (this  
register), registers 16h to 1E (LED PWM registers) and 37
to 39h (program counters).  
0
R/W  
1: internal startup sequence powers up all the needed inern
blocks and the device enters normal mode.  
5:4  
ENGINE1_EXEC  
The engine 1 program execution control regiser bits define  
how the program is executed. Program staraddess can be  
programmed to program counter (PC) register 0x37.  
00: Hold cuses the execution engito fiish the current  
instructin and hen stop. Program conter (PC) can be  
read or witten nly in this moe.  
01cute the instruction at the location pointed by the PC,  
incrnt the PC by one d then reset ENG1_EXEC bits to  
00 (i.enter hold).  
00  
R/W  
10: Start program exeution from the location pointed by the  
C. This mode is so clled “Free Run” mode.  
11: Executthe strction pointed by the current PC value  
and reset EN1_EXEC to 00 (i.e. enter hold). The difference  
between sp and execute once is that execute once does not  
incremnt the PC.  
www.austriamicrosystems.com  
Revision 1.3  
35 - 85  
AS3661  
Datasheet - Detailed Description  
Table 8. ENABLE / ENGINE CNTR 1 Register  
Register: 0x00  
ENABLE / ENGINE CNTR1  
Bit Description  
Bit  
Bit Name  
Default  
Access  
3:2  
ENGINE2_EXEC  
The engine 2 program execution control register bits define  
how the program is executed. Program start address can be  
programmed to program counter (PC) register 0x38.  
00: Hold causes the execution engine to finish the current  
instruction and then stop. Program counter (PC) can be  
read or written only in this mode.  
01: Execute the instruction at the location pointed by the PC,  
increment the PC by one and then reset ENG2_EXEC bits to  
00 (i.e. enter hold).  
00  
R/W  
10: Start program execution from the location pointed by he  
PC. This mode is also called “Free Run” mod.  
11: Execute the instruction pointed by the crrent PC value  
and reset ENG2_EXEC to 00 (i.e. enter hold). he difference  
between step and execute once is tht exeute once does not  
incrementhe P.  
1:0  
ENGINE3_EXEC  
The engi3 proram execution ontrol register bits define  
hothe program is executed. Program start address can be  
prod to program nter (PC) register 0x39.  
00: Hld causes the executin engine to finish the current  
instruction and then stopProgram counter (PC) can be  
ead or written only ithis mode.  
01: Executes thnstruction at the location pointed by the PC,  
increment tPC by one and then reset ENG3_EXEC bits to  
00 (i.e. enter hl).  
00  
R/W  
10: Stat program execution from the location pointed by the  
PChis mode is also called “Free Run” mode.  
1cute the instruction pointed by the current PC value  
and reset ENG3_EXEC to 00 (i.e. enter hold). The difference  
etween step and execute once is that execute once does not  
increment the PC.  
8.10.2 ENGINE CNTRL2  
The AS3661 supports up to four different eration modes which are defined in these registers.  
Disabled: Engines can be configed tdisabled mode each one separately.  
Load program: Writing to progam memory is allowed only when the engine is in load program operation mode and  
engine busy bit (reg 3A) is nset. Serial bus master should check the busy bit before writing to program memory. All  
the three engines are in ld while one or more engines are in load program mode. PWM values are frozen, also.  
Program execution cotinues when all the engines are out of load program mode. Load program mode resets the  
program counter ohe respective engine. Load program mode can be entered from the disabled mode only. Entering  
load program mode fm the run program mode is not allowed.  
Run ProgramRuprogram mode executes the instructions stored in the program memory. Execution register  
(ENG1_C etc.) bits define how the program is executed (hold, step, free run or execute once). Program start  
address n e programmed to the Program Counter (PC) register. The Program Counter is reset to zero when the  
PCs upper limit value is reached.  
Halt: Istruction execution aborts immediately and engine operation halts.  
www.austriamicrosystems.com  
Revision 1.3  
36 - 85  
AS3661  
Datasheet - Detailed Description  
Table 9. ENGINE CNTRL2 Register  
Register: 0x01  
ENGINE CNTRL2  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5:4  
ENGINE1_MODE  
00: Disabled  
01: Load program to SRAM, reset engine 1 PC  
10: Run program as defined by ENGINE1_EXEC bits  
11: Halts the engine  
00  
R/W  
3:2  
1:0  
ENGINE2_MODE  
ENGINE3_MODE  
00: Disabled  
01: Load program to SRAM, reset engine 2 PC  
10: Run program as defined by ENGINE2_EXEC bits  
11: Halts the engine  
00  
00  
R/W  
R/W  
00: Disabled  
01: Load program to SRAM, reset engine PC  
10: Run ograas defined by ENGINE_EXEC bits  
11: Halts te engne  
8.10.3 OUTPUT DIRECT/RATIOMETRIC MSB and B  
A particular feature of the AS3661 is the ratiometric up/down dimming of the RG-LEDs. In other words, the LED  
driver PWM output will vary in a ratiometric manner. By a ratiometric approathe emitted color of an RGB–LED  
remains the same regardless of the initial magnitus othe R/G/B PWutpus. For example, if the PWM output of  
the red LED output is doubled, the output of gren LED is doubled also
Table 10. OUTPUT DIRECT / RATIOMERIC MSB Register  
Register: 0x02  
Bit Name  
OUTPUDIRECT/RATIOMETRIC MSB  
Bit Description  
Bit  
Defa
Access  
0
LED9_RATIO_EN  
0: sables ratiometric dimming for LED9 output.  
enables ratiometric dimming for LED9 output.  
0
R/W  
Table 11. OUTPUT DIRECT / RATIOMETRIC LSB Register  
Register: 0x03  
Bit Name  
OUTPUT DIRECT/RATIOMETRIC LSB  
Bit  
Default  
Access  
Bit Description  
7
LED8_RATIO_EN  
0: Disables ratiometric dimming for LED8 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED7 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED6 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED5 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED4 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED3 output.  
1: enables ratiometric dimming for LED9 output.  
0
R/W  
6
5
4
3
2
LED7_RATIO_EN  
LED6_RATO_EN  
ED5_RATIO_EN  
LED4_RATIO_EN  
LED3_RATIO_EN  
0
0
0
0
0
R/W  
R/W  
R/W  
R/W  
R/W  
www.austriamicrosystems.com  
Revision 1.3  
37 - 85  
AS3661  
Datasheet - Detailed Description  
Table 11. OUTPUT DIRECT / RATIOMETRIC LSB Register  
Register: 0x03  
Bit Name  
OUTPUT DIRECT/RATIOMETRIC LSB  
Bit  
Default  
Access  
Bit Description  
1
LED2_RATIO_EN  
0: Disables ratiometric dimming for LED2 output.  
1: enables ratiometric dimming for LED9 output.  
0: Disables ratiometric dimming for LED1 output.  
1: enables ratiometric dimming for LED9 output.  
0
R/W  
0
LED1_RATIO_EN  
0
R/W  
8.10.4 OUTPUT ON/OFF CONTROL MSB and LSB  
The following two registers allow the user to switch all nine current sources independently from each other on and off
Please mind that this selection will be overridden if a current source is selected by one of the program execution  
engines.  
Table 12. OUTPUT ON/OFF CONTROL MSB Register  
Register: 0x04  
Bit Name  
OUTPUT ON/OFF CONTROL MSB  
Bit Descriptin  
Bit  
Default  
Access  
0
LED9_ON  
0: LED9 utput ff.  
0
R/W  
1: LED9 oput n.  
Table 13. OUTPUT ON/OFF CONTROL LSB Register  
Register: 0x05  
OUTPUT ON/OFF CONROL LSB  
it Description  
Bit  
Bit Name  
Default  
Accss  
7
LED8_ON  
0: LED8 outpuff.  
1: LED8 outpon.  
0: LED7 ouput off.  
1: D7 utput on.  
06 output off.  
1: LED6 output on.  
0: LED5 output off.  
1: LED5 output on.  
0: LED4 output off.  
1: LED4 output on.  
0: LED3 output off.  
1: LED3 output on.  
0: LED2 output off.  
1: LED2 output on.  
0: LED1 output off.  
1: LED1 output on.  
0
R/W  
6
5
4
3
2
1
0
LED7_ON  
LED6_ON  
LED5_ON  
LED4_ON  
LED3_ON  
LED2_ON  
LED1_N  
0
0
0
0
0
0
0
R/W  
R/W  
R/W  
R/W  
R/W  
R/W  
R/W  
www.austriamicrosystems.com  
Revision 1.3  
38 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.5 LEDx Control  
These registers are used to assign the any current source output to the MASTER FADER group 1, 2, or 3, or none of  
them. Also, the registers set the slope of the current sources output temperature compensation line and selects  
between linear and logarithmic PWM brightness adjustment. By using logarithmic PWM-scale the visual effect looks  
like linear. When the logarithmic adjustment is enabled, the chip handles internally PWM values with 12-bit resolution.  
This allows very fine-grained PWM control at low PWM duty cycles. If a MASTER FADER is selected for an output, the  
duty cycle on the output will be LED1 PWM register value (address 0x16) multiplied with the value in the MASTER  
FADER register.  
Besides the LED mapping and linear or logarithmic selection it is also possible to do a temperature compensation for  
each output separately. The PWM duty cycle at temperature T (in centigrade) can be obtained as follows: PWMF =  
[PWMS - (25 - T) * slope * PWMS] / 2, where PWMF is the final duty cycle at temperature T, PWMS is the set PWM duty  
cycle (PWM duty cycle is set in registers 16H to 1EH) and the value of the correction factor is obtained from Table 8.  
For example, if the set PWM duty cycle in register 16H is 90%, temperature T is -10°C and the chosen s lope is +1.5
°C, the final duty cycle PWMF for LED1 output will be [90% - (25°C - (-10°C))* 1.5 1/°C * 90%]/2 = [90 % - 35 * 15 *  
90%]/2 = 21.4%. Default setting 00000 means that the temperature compensation is non-active and the PWM output  
(0 to 100%) is set solely by PWM registers LED1 PWM to LED9 PWM.  
Table 14. LED1 CONTROL Register  
Register: 0x06  
Bit Name  
LED1 CONTROL  
Bit Descrption  
Bit  
Default  
Access  
7:6  
LED1_MAPPING  
Thegister defines the mapping of LED1 output to the master  
fadhe faders can eitr be used for dimming several  
LEDn parallel or for ratiomric control of the output.  
00: no master fader eleced  
00  
R/W  
1: MASTER FAR 1 controls LED1 output  
10: MASTEFAER 2 controls LED1 output  
11: MASTER FDER 3 controls LED1 output  
5
LED1_LOG_EN  
This biis effective for both, program execution engine and  
dirPWM control.  
0
R/W  
0ar adjustment.  
1: logarithmic adjustment.  
4:0 LED1_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not activated  
...  
01110: +1.4 1/°C  
01111: +1.5 1/°C  
www.austriamicrosystems.com  
Revision 1.3  
39 - 85  
AS3661  
Datasheet - Detailed Description  
Table 15. LED2 CONTROL Register  
Register: 0x07  
LED2 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:6  
LED2_MAPPING  
This register defines the mapping of LED2 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED2 output  
10: MASTER FADER 2 controls LED2 output  
11: MASTER FADER 3 controls LED2 output  
5
LED2_LOG_EN  
This bit is effective for both, program execution engine nd  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED2_TEMP_COMP  
The reference temperature is +25°C (i.e. te temper ature at  
which all sope settings have no effec) and te temperature  
coefficie(slopecan be set in 0.1 1/°C sps to any value  
between -5 1/°and +1.5 1/°C, ita default to 0.0 1/°C  
111.5 1/°C  
1111-1.4 1/°C  
0 0000  
R/W  
...  
0000: temperacompensation not activated  
...  
01110: +1.4 1/
011111.5 /°C  
Table 16. LED3 CONTROL Register  
Register: 0x08  
LED3 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Acces
7:6  
LED3_MAPPING  
This register defines the mapping of LED3 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED3 output  
10: MASTER FADER 2 controls LED3 output  
11: MASTER FADER 3 controls LED3 output  
www.austriamicrosystems.com  
Revision 1.3  
40 - 85  
AS3661  
Datasheet - Detailed Description  
Table 16. LED3 CONTROL Register  
Register: 0x08  
LED3 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5
LED3_LOG_EN  
This bit is effective for both, program execution engine and  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED3_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not ctivted  
...  
01110: +4 1/°C  
011: +1.5 1/°C  
Table 17. LED4 CONTROL Register  
Register: 0x09  
LED1 COTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:6  
LED4_MAPPING  
This registefins the mapping of LED4 output to the master  
faders. The faers can either be used for dimming several  
LEDs in parllel or for ratiometric control of the output.  
00: no mster fader selected  
00  
R/W  
0STER FADER 1 controls LED4 output  
10: MASTER FADER 2 controls LED4 output  
11: MASTER FADER 3 controls LED4 output  
5
LED4_LOG_EN  
This bit is effective for both, program execution engine and  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED4_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not activated  
...  
01110: +1.4 1/°C  
01111: +1.5 1/°C  
www.austriamicrosystems.com  
Revision 1.3  
41 - 85  
AS3661  
Datasheet - Detailed Description  
Table 18. LED5 CONTROL Register  
Register: 0x0A  
LED1 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:6  
LED5_MAPPING  
This register defines the mapping of LED5 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED5 output  
10: MASTER FADER 2 controls LED5 output  
11: MASTER FADER 3 controls LED5 output  
5
LED5_LOG_EN  
This bit is effective for both, program execution engine nd  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED5_TEMP_COMP  
The reference temperature is +25°C (i.e. te temper ature at  
which all sope settings have no effec) and te temperature  
coefficie(slopecan be set in 0.1 1/°C sps to any value  
between -5 1/°and +1.5 1/°C, ita default to 0.0 1/°C  
111.5 1/°C  
1111-1.4 1/°C  
0 0000  
R/W  
...  
0000: temperacompensation not activated  
...  
01110: +1.4 1/
011111.5 /°C  
Table 19. LED6 CONTROL Register  
Register: 0x0B  
LED6 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Acces
7:6  
LED6_MAPPING  
This register defines the mapping of LED6 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED6 output  
10: MASTER FADER 2 controls LED6 output  
11: MASTER FADER 3 controls LED6 output  
www.austriamicrosystems.com  
Revision 1.3  
42 - 85  
AS3661  
Datasheet - Detailed Description  
Table 19. LED6 CONTROL Register  
Register: 0x0B  
LED6 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5
LED6_LOG_EN  
This bit is effective for both, program execution engine and  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED6_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not ctivted  
...  
01110: +4 1/°C  
011: +1.5 1/°C  
Table 20. LED7 CONTROL Register  
Register: 0x0C  
LED7 COTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:6  
LED7_MAPPING  
This registefins the mapping of LED7 output to the master  
faders. The faers can either be used for dimming several  
LEDs in parllel or for ratiometric control of the output.  
00: no mster fader selected  
00  
R/W  
0STER FADER 1 controls LED7 output  
10: MASTER FADER 2 controls LED7 output  
11: MASTER FADER 3 controls LED7 output  
5
LED7_LOG_EN  
This bit is effective for both, program execution engine and  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED7_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not activated  
...  
01110: +1.4 1/°C  
01111: +1.5 1/°C  
www.austriamicrosystems.com  
Revision 1.3  
43 - 85  
AS3661  
Datasheet - Detailed Description  
Table 21. LED8 CONTROL Register  
Register: 0x0D  
LED8 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:6  
LED8_MAPPING  
This register defines the mapping of LED8 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED8 output  
10: MASTER FADER 2 controls LED8 output  
11: MASTER FADER 3 controls LED8 output  
5
LED8_LOG_EN  
This bit is effective for both, program execution engine nd  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED8_TEMP_COMP  
The reference temperature is +25°C (i.e. te temper ature at  
which all sope settings have no effec) and te temperature  
coefficie(slopecan be set in 0.1 1/°C sps to any value  
between -5 1/°and +1.5 1/°C, ita default to 0.0 1/°C  
111.5 1/°C  
1111-1.4 1/°C  
0 0000  
R/W  
...  
0000: temperacompensation not activated  
...  
01110: +1.4 1/
011111.5 /°C  
Table 22. LED9 CONTROL Register  
Register: 0x0E  
LED9 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Acces
7:6  
LED9_MAPPING  
This register defines the mapping of LED9 output to the master  
faders. The faders can either be used for dimming several  
LEDs in parallel or for ratiometric control of the output.  
00: no master fader selected  
00  
R/W  
01: MASTER FADER 1 controls LED9 output  
10: MASTER FADER 2 controls LED9 output  
11: MASTER FADER 3 controls LED9 output  
www.austriamicrosystems.com  
Revision 1.3  
44 - 85  
AS3661  
Datasheet - Detailed Description  
Table 22. LED9 CONTROL Register  
Register: 0x0E  
LED9 CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5
LED9_LOG_EN  
This bit is effective for both, program execution engine and  
direct PWM control.  
0
R/W  
0: linear adjustment.  
1: logarithmic adjustment.  
4:0 LED8_TEMP_COMP  
The reference temperature is +25°C (i.e. the temper ature at  
which all slope settings have no effect) and the temperature  
coefficient (slope) can be set in 0.1 1/°C steps to any value  
between -1.5 1/°C and +1.5 1/°C, with a default to 0.0 1/°C  
11111: -1.5 1/°C  
11110: -1.4 1/°C  
0 0000  
R/W  
...  
00000: temperature compensation not ctivted  
...  
01110: +4 1/°C  
011: +1.5 1/°C  
8.10.6 LEDx PWM  
This is the PWM duty cycle control for LED1 to ED9 output. The PWM gisters are effective during direct control  
operation. Direct PWM control is active aftepowr up by default.  
Note: Serial bus address auto increment s not supported for regster addresses from 16 to 1E.  
Note: If the temperature compensatis active, the maum PWM duty cycle is 50% at +25°C. This is require d to  
allow enough headroom for temperature compen over the temperature range -40 °C to 90°C.  
Table 23. LED1 PWM Register  
Register: 0x16  
Bit Name  
LED1 PWM  
Bit Description  
Bit  
Default  
Access  
7:0  
LED1_PWM  
This register controls the duty cycle of LED1 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
R/W  
1111 1111: 100% Duty Cycle  
www.austriamicrosystems.com  
Revision 1.3  
45 - 85  
AS3661  
Datasheet - Detailed Description  
Table 24. LED2 PWM Register  
Register: 0x17  
LED2 PWM  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED2_PWM  
This register controls the duty cycle of LED2 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
R/W  
1111 1111: 100% Duty Cycle  
Table 25. LED3 PWM Register  
Register: 0x18  
LED3 PWM  
Bit  
Bit Name  
Default  
Access  
Bit Description  
7:0  
LED3_PWM  
This registr controls the duty cycle oED3 PWM output.  
0000 000: 0% Dty Cycle  
0000 0001: .3921% Duty Cycle  
000100.7843% Duty ycle  
0000 011: 1.1765% DuCyce  
....  
0000 0000  
R/W  
111 1111: 100% ty Cycle  
Table 26. LED4 PWM Register  
Register: 0x19  
LED4 PWM  
Bit  
Bit Name  
Defa
Access  
Bit Description  
7:0  
LED4_PWM  
Tgister controls the duty cycle of LED4 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
/W  
1111 1111: 100% Duty Cycle  
Table 27. LED5 PWM Rgiste
Register0x1A  
LED5 PWM  
Bit  
Bit Nae  
Default  
Access  
Bit Description  
7:0  
LED5PWM  
This register controls the duty cycle of LED5 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
R/W  
1111 1111: 100% Duty Cycle  
www.austriamicrosystems.com  
Revision 1.3  
46 - 85  
AS3661  
Datasheet - Detailed Description  
Table 28. LED6 PWM Register  
Register: 0x1B  
LED6 PWM  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED6_PWM  
This register controls the duty cycle of LED6 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
R/W  
1111 1111: 100% Duty Cycle  
Table 29. LED7 PWM Register  
Register: 0x1C  
LED7 PWM  
Bit  
Bit Name  
Default  
Access  
Bit Description  
7:0  
LED7_PWM  
This registr controls the duty cycle oED7 PWM output.  
0000 000: 0% Dty Cycle  
0000 0001: .3921% Duty Cycle  
000100.7843% Duty ycle  
0000 011: 1.1765% DuCyce  
....  
0000 0000  
R/W  
111 1111: 100% ty Cycle  
Table 30. LED8 PWM Register  
Register: 0x1D  
LED8 PWM  
Bit  
Bit Name  
Defa
Access  
Bit Description  
7:0  
LED8_PWM  
Tgister controls the duty cycle of LED8 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
/W  
1111 1111: 100% Duty Cycle  
Table 31. LED9 PWM Rgiste
Register0x1E  
LED9 PWM  
Bit  
Bit Nae  
Default  
Access  
Bit Description  
7:0  
LED9PWM  
This register controls the duty cycle of LED9 PWM output.  
0000 0000: 0% Duty Cycle  
0000 0001: 0.3921% Duty Cycle  
0000 0010: 0.7843% Duty Cycle  
0000 0011: 1.1765% Duty Cycle  
....  
0000 0000  
R/W  
1111 1111: 100% Duty Cycle  
www.austriamicrosystems.com  
Revision 1.3  
47 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.7 LEDx CURRENT CONTROL  
With the following register it is possible to control the output current of each current source separately. The resolution  
of the current sources is 8-bit which gives a step size is 100 µA with a maximum output current of 25.5mA per current  
source.  
Table 32. LED1 CURRENT CONTROL Register  
Register: 0x26  
Bit Name  
LED1 CURRENT CONTROL  
Bit Description  
Bit  
Default  
Access  
7:0  
LED1_CURRENT  
This register controls the output current of current source  
LED1 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 11125.5m
Table 33. LED2 CURRENT CONTROL Register  
Register: 0x27  
D2 CURRENT CONROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED2_CURRENT  
his register controls thoutput current of current source  
LED2 in 100µA ps from 0µA up to 25.5mA.  
0000 0000: mA  
0000 00010.1mA  
...  
1010 1
R/W  
111: 17.5mA  
...  
111 1110: 25.4mA  
1111 1111: 25.5mA  
Table 34. LED3 CURRENT CONTROL Rter  
Register: 0x28  
LED3 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED3_CURRENT  
This register controls the output current of current source  
LED3 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 1111: 25.5mA  
www.austriamicrosystems.com  
Revision 1.3  
48 - 85  
AS3661  
Datasheet - Detailed Description  
Table 35. LED4 CURRENT CONTROL Register  
Register: 0x29  
LED4 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED4_CURRENT  
This register controls the output current of current source  
LED4 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 1111: 25.5mA  
Table 36. LED5 CURRENT CONTROL Register  
Register: 0x2A  
LED5 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED5_CURRENT  
This registr conrols the output urenof current source  
LEn 100µA steps from 0µA up to 25.5mA.  
000000: 0mA  
0000 0001: 0.1mA  
.  
1010 1111  
R/W  
1010 1111: 17.5A  
...  
1111 1110: 2.4mA  
11111125.5mA  
Table 37. LED6 CURRENT CONTROL Register  
Register: 0x2B  
LED6 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED6_CURRENT  
This register controls the output current of current source  
LED6 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 1111: 25.5mA  
www.austriamicrosystems.com  
Revision 1.3  
49 - 85  
AS3661  
Datasheet - Detailed Description  
Table 38. LED7 CURRENT CONTROL Register  
Register: 0x2C  
LED7 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED7_CURRENT  
This register controls the output current of current source  
LED7 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 1111: 25.5mA  
Table 39. LED8 CURRENT CONTROL Register  
Register: 0x2D  
LED8 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED8_CURRENT  
This registr conrols the output urenof current source  
LEn 100µA steps from 0µA up to 25.5mA.  
000000: 0mA  
0000 0001: 0.1mA  
.  
1010 1111  
R/W  
1010 1111: 17.5A  
...  
1111 1110: 2.4mA  
11111125.5mA  
Table 40. LED9 CURRENT CONTROL Register  
Register: 0x2E  
LED9 CURRENT CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED9_CURRENT  
This register controls the output current of current source  
LED9 in 100µA steps from 0µA up to 25.5mA.  
0000 0000: 0mA  
0000 0001: 0.1mA  
...  
1010 1111  
R/W  
1010 1111: 17.5mA  
...  
1111 1110: 25.4mA  
1111 1111: 25.5mA  
www.austriamicrosystems.com  
Revision 1.3  
50 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.8 MISC  
This register contains miscellaneous control bits like the clock detection. Program execution is clocked with internal  
32.7 kHz clock or with external clock. External clock can be used if a clock signal is present on CLK-pin. The external  
clock frequency must be 32.7 kHz in oder to meet the timing specifications of the datasheet and for correct operation.  
If a higher or a lower frequency is used, it will affect on the program execution engine operation speed. The detector  
block does not limit the maximum frequency. External clock status can be checked with read only bit EXT_CLK_USED  
in register address 3A, when the external clock detection is enabled (Bit [1] CLK_DET_EN = high).  
If external clock is not used in the application, CLK pin should be connected to GND to avoid oscillation on this pin and  
extra current consumption.  
Table 41. OUTPUT ON/OFF CONTROL LSB Register  
Register: 0x05  
Bit Name  
OUTPUT ON/OFF CONTROL LSB  
Bit Description  
Bit  
Default  
Access  
7
VARIABLE_D_SEL  
The variable D can be linked to two different sources. Th
default source for variable D is register 0x3C bt it can be  
assigned to the LED test ADC output. This aowsor example,  
program execution control with an analog signl.  
0
R/W  
0: variablD source is register 0x3
1: variabD soue is LED test ADC.  
6
EN_AUTO_INCR  
Thautomatic increment feature of the serial bus address  
enaquick memory rte of successive registers within  
one nsmission.  
1
0
R/W  
R/W  
0: serial bus address utoatic increment is disabled.  
: serial bus addss automatic increment is enabled.  
5
POWERSAVE_EN  
CP_MODE  
Please refr to stio8.14.9 for a detailed description of the  
powersave mde of AS3661.  
0: power sve mode is disabled.  
1: power save mode is enabled.  
4:3  
gister bits control the operation mode of the integrated  
charge pump. The charge pump can be switched off, forced to  
ypass mode, forced to 1.5x mode and automatic operation.  
00: CP is switched off.  
00  
R/W  
01: CP is forced to bypass mode (1x).  
10: CP is forced to 1.5x mode (output voltage is 4.5V)  
11: CP is in automatic mode depending on load conditions  
2
PWM_PS_EN  
For a detailed description of this power save mode please refer  
to section 8.14.10. This mode can only be used if the CP is in  
off mode or 1x mode.  
0
R/W  
R/W  
0: PWM power save mode disabled.  
1: PWM power save mode enabled.  
The following bits define the clock selection of AS3661.  
00: forced external clock (CLK pin).  
01: forced internal clock.  
1
0
CK_DET_EN  
NT_CLK_EN  
00  
10: automatic clock selection.  
11: internal clock.  
www.austriamicrosystems.com  
Revision 1.3  
51 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.9 ENGINEx PC  
The program counter defines the starting value for each program execution engine. It can be any value between 000  
0000 to 101 1111. The maximum value depends on program memory allocation between the three program execution  
engines.  
Table 42. ENGINE1 PC Register  
Register: 0x37  
Bit Name  
ENGINE1 PC  
Bit Description  
Bit  
Default  
Access  
6:0  
ENGINE1_PC  
Program counter value for execution engine1 from 000 0000 t
101 1111 depending on the memory allocation of the  
application.  
000 0000  
R/W  
Table 43. ENGINE2 PC Register  
Register: 0x38  
ENGINE2 PC  
Bit  
Bit Name  
Default  
Access  
Bit Description  
6:0  
ENGINE2_PC  
Program counter value for execution engie2 frm 000 0000 to  
101 1111 dpending on the memory catin of the  
application.  
000 0000  
R/W  
Table 44. ENGINE3 PC Register  
Register: 0x39  
ENGINE3 PC  
Bit  
Bit Name  
Default  
Access  
Bit Description  
6:0  
ENGINE3_PC  
rogram counter value or execution engine 3 from 000 0000  
o 101 1111 deping on the memory allocation of the  
application
000 0000  
R/W  
8.10.10 STATUS/INTERRUPT  
This register contains several status interrupt regist
Table 45. STATUS / INTERRUPT Register  
Register: 0x3A  
STATUS / INTERRUPT  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7
LEDTEST_MEAS_D  
ONE  
This bit indicates when the LED test is done, and the result is  
written to the LED_TEST_ADC register (0x42). Typically the  
conversion takes 2.7 milliseconds to complete. The bit will not  
be cleared after conversion. Each write command to this  
register starts another conversion.  
0
R/W  
0: LED test not done.  
1: LED test done.  
6
MASKBUSY  
Mask bit for interrupts generated by STARTUP_BUSY or  
ENGINE_BUSY.  
0: External interrupt will be generated when STARTUP_BUSY  
or ENGINE_BUSY condition is no longer true. Reading the  
register 3A clears the status bits [5:4] and releases INT pin to  
high state.  
1
R/W  
1: Interrupt events will be masked i.e. no external interrupt  
will be generated from STARTUP_BUSY or ENGINE_BUSY  
event (default).  
www.austriamicrosystems.com  
Revision 1.3  
52 - 85  
AS3661  
Datasheet  
Table 45. STATUS / INTERRUPT Register  
Register: 0x3A  
STATUS / INTERRUPT  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5
STARTUP_BUSY  
A status bit which indicates that the device is running the  
internal start-up sequence. Please note that STARTUP_BUSY  
bit is always “1” when CHIP_EN bit is “0”. Please refer to  
section 8.5 for detailed startup mode description.  
0
R
0: internal start-up sequence completed.  
1: internal start-up sequence running.  
4
ENGINE_BUSY  
A status bit which indicates that a program execution engine i
clearing internal registers. Serial bus master should not write  
or read program memory, or registers 0x00, 0x37 to 0x3or  
0x4C to 0x4E, when this bit is set to "1".  
0
R
0: engine ready.  
1: at least one of the engines is clearing inteal rgisters.  
3
2
1
0
EXT_CLK_USED  
ENG1_INT  
This bit is high when external clock sgnal n CLK pin is  
detected. CLK_ET_EN bit high in addess 36 enables the  
clock detction.  
0
0
0
0
R
R
R
R
0: xternal clock not detected.  
1: eal clock detected
This ithe interrupt statubit for program execution engine 1.  
The bit is set by END r INT instruction. Reading the interrupt  
t clears the intept.  
0: interrupt uns/clared.  
1: interrupt se
ENG2_INT  
This is he inerrupt status bit for program execution engine 2.  
The bit iset by END or INT instruction. Reading the interrupt  
brs the interrupt.  
0: interrupt unset/cleared.  
: interrupt set.  
ENG3_INT  
This is the interrupt status bit for program execution engine 3.  
The bit is set by END or INT instruction. Reading the interrupt  
bit clears the interrupt.  
0: interrupt unset/cleared.  
1: interrupt set.  
www.austriamicrosystems.com  
Revision 1.3  
53 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.11 GPO  
AS3661 has one General Purpose Output pin (GPO). Status of the pin can be controlled with this register. Also, INT  
pin can be configured to function as a GPO by setting the bit EN_GPO_INT. When INT is configured to function as a  
GPO, output level is defined by the VBAT voltage.  
When INT pin’s GPO function is disabled, it operates as an open drain pin. INT signal is active low, i.e. when interrupt  
signal is send, the pin is pulled to GND. External pull-up resistor is needed for proper functionality.  
Table 46. GPO Register  
Register: 0x3B  
Bit Name  
GPO  
Bit  
Default  
Access  
Bit Description  
2
INT_CONF  
This bit defines the function of GPO pin. It can either be  
configures as interrupt pin or as general purpose output pin.  
0
R/W  
0: INT pin is set to function as an interrupt pin.  
1: INT pin is configured to function as a GPO.  
This register controls the state of pin GPO.  
0: GPO pin state is low.  
1
0
GPO  
0
0
R/W  
R/W  
1: GPO pn statis high. GPO pin is a dgital CMOS output,  
and no pldown esistor is needed.  
INT_GPO  
If Ipin is defined as general purpose output (INT_CONF bit  
musto”1”), it is poble to control the INT pin with this  
bit.  
0: INT pin state is lo(if IT_CONF = 1).  
INT pin state igh (iINT_CONF = 1).  
8.10.12 VARIABLE  
The variable can be sued to store datorder to controxample the data flow.  
Table 47. GPO Register  
Register: 0x3C  
Bit Name  
GPO  
Bit  
Default  
Access  
Bit Description  
7:0  
VARIABLE_D  
These bits are used for storing a global 8–bit variable. Variable  
can be used to control program flow.  
0000 000  
R/W  
8.10.13 RESET  
Table 48. RESET Register  
Register: 0x3D  
RESET  
Bit  
Bit Nme  
Default  
Access  
Bit Description  
7:0  
RESET  
Writing 11111111 into this register resets the AS3661. Internal  
registers are reset to the default values. Reading RESET  
register returns 00000011.  
0000 0011  
R/W  
www.austriamicrosystems.com  
Revision 1.3  
54 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.14 TEMP ADC CONTROL  
Table 49. TEMP ADC CONTROL Register  
Register: 0x3E  
TEMP ADC CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7
TEMP_MEAS_BUSY  
Indicates the status of the temperature measurement ADC of  
AS3661.  
0
R
0: temperature measurements done or not activated.  
1: temperature measurement active.  
2
1
0
EN_TEMP_SENSOR  
Every time when EN_TEMP_SENSOR is written high a new  
measurement period is started. The length of the  
measurement period depends on temperature. At 25°C 
measurement takes 20 milliseconds. Temperature can be ead  
from register 0x3F.  
0
0
R/W  
R/W  
0: temperature sensor disabled.  
1: enable internal temperature sensor and start measurement.  
CONTINUOUS_CON  
V
When ENTEMP_SENSOR bit is set t1” it is possible to  
enable a ontinus temperature converstion setting the  
CONTINUUS_CONV bit in this eisr.  
0: mperature measurement period initiated during  
starp or after exit from ower save mode.  
1: coninuous temperature measurement. Not active when the  
device is in powersave
SEL_EXT_TEMP  
It is possible to the temperature compensation register  
either to thnteral temperature measurement result register  
0x3F or to the EMPERATURE WRITE register 0x40. This  
register can be sued to store the temperature of an external  
temperaure measurement device to AS3661 in order to use it  
fD temperature compensation.  
0
R/W  
0: perature compensation source register addr 3FH.  
temperature compensation source register addr 40H.  
8.10.15 TEMPERATURE READ  
Table 50. TEMPERATURE READ Regist
Register: 0x3F  
TEMPERATURE READ  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
TEMPERATURE  
_READ  
These bits are used for storing an 8-bit temperature reading  
acquired from the internal temperature sensor. This register is  
a read-only register. Temperature reading is stored in 8-bit  
two's complement format, see the table below.  
1101 1010: -38°C  
...  
0001 1001  
R
0001 1001: 25°C  
...  
0101 1000: 88°C  
0101 1001: 89°C  
Note: When writing temperature data outside the range of the temperature compensation: Values greater than 89°C  
will be set to 89°C; values less than -38°C will be set to -38°C.  
www.austriamicrosystems.com  
Revision 1.3  
55 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.16 TEMPERATURE WRITE  
Table 51. TEMPERATURE WRITE Register  
Register: 0x40  
TEMPERATURE WRITE  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
TEMPERATURE  
_WRITE  
These bits are used for storing an 8-bit temperature reading  
acquired from an external temperature sensor, if such a sensor  
is used. Temperature reading is stored in 8-bit two's  
complement format, see the table below.  
1101 1010: -38°C  
...  
0000 0000  
R/W  
0001 1001: 25°C  
...  
0101 1000: 88°C  
0101 1001: 89°C  
Note: When writing temperature data outside the range of the mpeture compensation: Vaues greater than 89°C  
will be set to 89°C; values less than -38°C will be set to 8°C.  
8.10.17 LED TEST CONTROL  
Table 52. LED TEST CONTROL Register  
Register: 0x41  
Bit Name  
LED TEST CNTROL  
Bit Description  
Bit  
Default  
Access  
7
EN_LED_TEST  
_ADC  
Writing this high (1) fires single LED test conversation. Thus  
each time you nt to start a conversion it is necessary to  
write a 1” to his register. The measurement cycle is 2.7  
millisecods per conversion.  
0
R/W  
test measurement disabled.  
1: LED test measurement enabled  
6
EN_LED_TEST_INT  
This register enabled the interrupt for the LED test ADC.  
Interrupt can be cleared by reading STATUS/INTERRUPT  
register 0x3A.  
0
R/W  
0: no interrupt signal will be send to the INT pin when the  
LED test is accomplished.  
1: interrupt signal will be send to the INT pin when the LED test  
is accomplished.  
www.austriamicrosystems.com  
Revision 1.3  
56 - 85  
AS3661  
Datasheet - Detailed Description  
Table 52. LED TEST CONTROL Register  
Register: 0x41  
LED TEST CONTROL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
5
CONTINUOUS  
_CONV  
When EN_LED_TEST_ADC bit is set to”1”, it is possible to  
enable a continuous conversation setting the  
CONTINUOUS_CONV bit to “1” in this register.  
0
R/W  
0: continuous conversion is disabled.  
1: continuous LED test measurement. Not active in powersave  
mode.  
4:0  
LED_TEST_CTRL  
These bits are used for choosing the LED driver output to be  
measured with the LED test ADC. In addition to the LED  
outputs is is possible to measure VDD , INT-pin and chage-  
pump output voltage as well.  
0 0000: LED1  
0 0001: LED2  
0 0010: LED3  
0 0011: LD4  
0 0100: LED5  
0 0000  
R/W  
0 0ED6  
0 01: LED7  
0 0111: LED8  
1000: LED9  
0 1001 to 0 1110esrved, do not use  
0 1111: VCP  
1 000VBA
1 1: INT-pin  
1to 11111: reserved, do not use  
8.10.18 LED TEST ADC  
Table 53. LED TEST ADC Register  
Register: 0x42  
LED TEST ADC  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
LED_TEST_ADC  
This is used to store the LED test result. Read-only register.  
LED test ADC least significant bit corresponds to 30mV. The  
measured voltage V (typ.) is calculated as follows: V =  
(RESULT(DEC) x 0.03 - 1.478 V. For example, if the result is  
10100110 = 166(DEC), the measured voltage is 3.50V  
(typ.)(see Figure 28 on page 58).  
N/A  
R
www.austriamicrosystems.com  
Revision 1.3  
57 - 85  
AS3661  
Datasheet - Detailed Description  
Figure 28. LED Test Results vs. Measured Voltage  
5
4
3
2
1
0
40  
90  
140  
190  
RESULT (DEC)  
8.10.19 ENGINE1 VARIABLE A  
Table 54. ENGINE1 VARIABLE A Register  
Register: 0x45  
ENGINE1 VARIABLE A  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
ENGINE1_  
VARIABLE_A  
These bitare used for engine 1 s a local variable. The  
regter is a read only register and can be used for example for  
aritperations with e program execution engine.  
0000 0000  
R
8.10.20 ENGINE2 VARIABLE A  
Table 55. ENGINE2 VARIABLE A Register  
Register: 0x46  
ENGNE2 VARIABLE A  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
ENGINE2_  
VARIABLE_A  
These bts are used for engine 2 as a local variable. The  
rr is a read only register and can be used for example for  
atic operations with the program execution engine.  
0000 0  
R
8.10.21 ENGINE3 VARIABLE A  
Table 56. ENGINE3 VARIABLE A Register  
Register: 0x47  
ENGINE3 VARIABLE A  
Bit Description  
Bit  
Bit Name  
efault  
Access  
7:0  
ENGINE3_  
VARIABLE_A  
These bits are used for engine 3 as a local variable. The  
register is a read only register and can be used for example for  
arithmetic operations with the program execution engine.  
000 0000  
R
8.10.22 MASTER FADER1  
Table 57. MASTER FADER1 Register  
Rster: 0x48  
MASTER FADER1  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
MASTER_FADER1  
An 8-bit register to control all the LED-drivers mapped to  
MASTER FADER1. Master fader allows the user to control  
dimming of multiple LEDS with a single serial bus write. This is  
a faster method to control the dimming of multiple LEDs  
compared to the dimming done with the PWM registers  
(address 0x16 to 0x1E), which would need multiple writes.  
0000 0000  
R/W  
www.austriamicrosystems.com  
Revision 1.3  
58 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.23 49 MASTER FADER2  
Table 58. MASTER FADER2 Register  
Register: 0x49  
MASTER FADER2  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
MASTER_FADER2  
An 8-bit register to control all the LED-drivers mapped to  
MASTER FADER2. Master fader allows the user to control  
dimming of multiple LEDS with a single serial bus write. This is  
a faster method to control the dimming of multiple LEDs  
compared to the dimming done with the PWM registers  
(address 0x16 to 0x1E), which would need multiple writes.  
0000 0000  
R/W  
8.10.24 4A MASTER FADER3  
Table 59. MASTER FADER3 Register  
Register: 0x4A  
MASTER FADER3  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7:0  
MASTER_FADER3  
An 8-bit rgisteo control all the LED-dvers mapped to  
MASTER FADER. Master fader allows the user to control  
dimming of ultiple LEDS with a single serial bus write. This is  
a fethod to controthe dimming of multiple LEDs  
comed to the dimming dne with the PWM registers  
(addrss 0x16 to 0x1E), hich would need multiple writes.  
0000 0000  
R/W  
8.10.25 ENG1 PROG START ADDR  
Table 60. ENG1 PROG START ADDR Regier  
Register: 0x4C  
ENG1 PROG START ADDR  
Bit Description  
Bit  
Bit Name  
Defa
Access  
6:0  
ENG1_PROG_  
START_ADDR  
gram memory start address for program execution  
engine 1 is defined in this register.  
000 0000  
R/W  
8.10.26 ENG2 PROG START ADDR  
Table 61. ENG2 PROG START ADDR Reiste
Register: 0x4D  
ENG2 PROG START ADDR  
Bit Description  
Bit  
Bit Name  
Defaut  
Access  
6:0  
ENG2_PROG_  
START_ADDR  
The program memory start address for program execution  
engine 2 is defined in this register.  
00 0000  
R/W  
8.10.27 ENG3 POG START ADDR  
Table 62. ENG2 PROG START ADDR Register  
Reister: 0x4E  
ENG3 PROG START ADDR  
Bit Description  
Bit  
Bit Name  
Default  
Access  
6:
ENG3_PROG_  
START_ADDR  
The program memory start address for program execution  
engine 3 is defined in this register.  
000 0000  
R/W  
www.austriamicrosystems.com  
Revision 1.3  
59 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.28 PROG MEM PAGE SELECT  
Table 63. PROG MEM PAGE SEL Register  
Register: 0x4F  
PROG MEM PAGE SEL  
Bit Description  
Bit  
Bit Name  
Default  
Access  
2:0  
PAGE_SEL  
These bits select the program memory page. The program  
memory is divided into six pages of 16 instructions; thus the  
total amount of the program memory is 96 instructions.  
000: Program Memory 0x00 - 0x0F selected.  
001: Program Memory 0x10 - 0x1F selected.  
010: Program Memory 0x20 - 0x2F selected.  
011: Program Memory 0x30 - 0x3F selected.  
100: Program Memory 0x40 - 0x4F selected.  
101: Program Memory 0x50 - 0x5F selected.  
000  
R/W  
8.10.29 ENG1 MAPPING MSB  
Table 64. ENG1 MAPPING MSB Register  
Register: 0x70  
ENG1 MAPPING MSB  
Bit  
Bit Name  
Default  
Access  
Bit escription  
7
ENG1_GPO  
0: GPO pin non-maped to the program exec. engine 1.  
1: GPO pin is mapped o the program execution engine 1.  
0: LED9 pin nomapped to the program exec. engine1.  
1: LED9 pin imapped to the program execution engine 1.  
0
R
0
ENG1_LED9  
0
R
8.10.30 71H ENG1 MAPPING LSB  
Table 65. ENG1 MAPPING LSB Register  
Register: 0x71  
ENG1 MAPPING LSB  
Bit  
Bit Name  
Default  
Access  
Bit Description  
7
ENG1_LED8  
0: LED8 pin non-mapped to the program exec. engine 1.  
1: LED8 pin is mapped to the program execution engine 1.  
0: LED7 pin non-mapped to the program exec. engine 1.  
1: LED7 pin is mapped to the program execution engine 1.  
0: LED6 pin non-mapped to the program exec. engine 1.  
1: LED6 pin is mapped to the program execution engine1.  
0: LED5 pin non-mapped to the program exec. engine 1.  
1: LED5 pin is mapped to the program execution engine 1.  
0: LED4 pin non-mapped to the program exec. engine 1.  
1: LED4 pin is mapped to the program execution engine 1.  
0: LED3 pin non-mapped to the program exec. engine 1.  
1: LED3 pin is mapped to the program execution engine 1.  
0: LED2 pin non-mapped to the program exec. engine 1.  
1: LED2 pin is mapped to the program execution engine 1.  
0: LED1 pin non-mapped to the program exec. engine 1.  
1: LED1 pin is mapped to the program execution engine 1.  
0
R
6
5
4
3
2
1
0
ENG1_LED7  
ENG1_LED6  
ENG_LE5  
ENG1LED4  
ENG1_LED3  
ENG1_LED2  
ENG1_LED1  
0
0
0
0
0
0
0
R
R
R
R
R
R
R
www.austriamicrosystems.com  
Revision 1.3  
60 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.31 ENG2 MAPPING MSB  
Table 66. ENG2 MAPPING MSB Register  
Register: 0x72  
ENG2 MAPPING MSB  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7
ENG2_GPO  
0: GPO pin non-mapped to the program exec. engine 2.  
1: GPO pin is mapped to the program execution engine 2.  
0: LED9 pin non-mapped to the program exec. engine2.  
1: LED9 pin is mapped to the program execution engine 2.  
0
R
0
ENG2_LED9  
0
R
8.10.32 ENG2 MAPPING LSB  
Table 67. ENG2 MAPPING LSB Register  
Register: 0x73  
ENG2 MAPPING LSB  
Bit  
Bit Name  
Default  
Access  
Bit Description  
7
ENG2_LED8  
0: LED8 pin non-mapped to the prgam exec. engine 2.  
1: LED8 in is mpped to the program excution engine 2.  
0: LED7 pino-mapped to the progam exec. engine 2.  
1: Ln is mapped to he program execution engine 2.  
0: LE6 pin non-mapped to the program exec. engine 2.  
1: LED6 pin is mappto the program execution engine 2.  
: LED5 pin noapped to the program exec. engine 2.  
1: LED5 pis mpped to the program execution engine 2.  
0: LED4 pin nn-mapped to the program exec. engine 2.  
1: LEDpin is mapped to the program execution engine 2.  
03 pin non-mapped to the program exec. engine 2.  
1: 3 pin is mapped to the program execution engine 2.  
LED2 pin non-mapped to the program exec. engine 2.  
1: LED2 pin is mapped to the program execution engine 2.  
0: LED1 pin non-mapped to the program exec. engine 2.  
1: LED1 pin is mapped to the program execution engine 2.  
0
R
6
5
4
3
2
1
0
ENG2_LED7  
ENG2_LED6  
ENG2_LED5  
ENG2_LED4  
ENG2_LED3  
ENG2_LED2  
ENG2_LED1  
0
0
0
0
0
0
0
R
R
R
R
R
R
R
8.10.33 ENG3 MAPPING MSB  
Table 68. ENG3 MAPPING MSB Register  
Register: 0x74  
ENG3 MAPPING MSB  
Bit  
Bit Nme  
Default  
Access  
Bit Description  
7
ENG3_GPO  
0: GPO pin non-mapped to the program exec. engine 3.  
1: GPO pin is mapped to the program execution engine 3.  
0: LED9 pin non-mapped to the program exec. engine 3.  
1: LED9 pin is mapped to the program execution engine 3.  
0
R
0
ENG3_LED9  
0
R
www.austriamicrosystems.com  
Revision 1.3  
61 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.34 ENG3 MAPPING LSB  
Table 69. ENG3 MAPPING LSB Register  
Register: 0x75  
ENG3 MAPPING LSB  
Bit Description  
Bit  
Bit Name  
Default  
Access  
7
ENG3_LED8  
0: LED8 pin non-mapped to the program exec. engine 3.  
1: LED8 pin is mapped to the program execution engine 3.  
0: LED7 pin non-mapped to the program exec. engine 3.  
1: LED7 pin is mapped to the program execution engine 3.  
0: LED6 pin non-mapped to the program exec. engine .  
1: LED6 pin is mapped to the program execution engin3.  
0: LED5 pin non-mapped to the program exec. engin3.  
1: LED5 pin is mapped to the program executin engine 3.  
0: LED4 pin non-mapped to the program xec. engine 3.  
1: LED4 pin is mapped to the program exeution engine 3.  
0: LED3 in nomapped to the progrm exec. engine 3.  
1: LED3 pis mpped to the proram execution engine 3.  
0: pin non-mapped to the program exec. engine 3.  
1: LE2 pin is mapped to thprogram execution engine 3.  
0: LED1 pin non-maped o the program exec. engine 3.  
LED1 pin is mped tthe program execution engine 3.  
0
R
6
5
4
3
2
1
0
ENG3_LED7  
ENG3_LED6  
ENG3_LED5  
ENG3_LED4  
ENG3_LED3  
ENG3_LED2  
ENG3_LED1  
0
0
0
0
0
0
0
R
R
R
R
R
R
R
www.austriamicrosystems.com  
Revision 1.3  
62 - 85  
AS3661  
Datasheet - Detailed Description  
8.10.35 GAIN CHANGE CTRL  
With hysteresis and timer bits the user can optimize the charge pump performance to better meet the requirements of  
the application at hand. Some applications need to be optimized for efficiency and others need to be optimized for  
minimum EMI, for example.  
Table 70. GAIN CHANGE CTRL Register  
Register: 0x76  
Bit Name  
GAIN CHANGE CTRL  
Bit Description  
Bit  
Default  
Access  
7:6  
TRESHOLD  
Bits set the threshold voltage at which the charge pump gain  
changes from 1.5x to 1x. The threshold voltage is defined as  
the voltage difference between highest voltage output (LED1  
to LED6) and input voltage VBAT: VTRESHOLD = VBAT - MAX  
(voltage on LED1 to LED6). If VTRESHOLD is larger than te se
value (100mV to 400mV), the charge pump is in 1x mod
00  
R/W  
00: 400mV  
01: 300mV  
10: 200mV  
11: 100m
5
ADAPTIVE_  
TRESH_EN  
Gain chane hyeresis prevents hmode from toggling back  
anth (1x -> 1.5x -> 1x...) , which would cause ripple on VIN  
and flicker. When the daptive threshold is enabled, the  
width f the hysteresis region epends on the choice of  
TRESHOLD bits (see abov), saturation of the current  
ources, charge pump oad current, PWM overlap and  
emperature.  
0
R/W  
0: Adaptivhreshold disabled.  
1: Adaptivthreshold enabled.  
4:3  
TIMER  
A forcemode change from 1.5x to 1.0x is attempted at the  
il specified with these bits. Mode change is allowed if  
tenough voltage over the LED drivers to ensure proper  
operation. Set FORCE_1x to "1" (see below) to activate this  
fature.  
00  
R/W  
00: 5ms  
01: 10ms  
10: 50ms  
11: infinite  
2
FORCE_1x  
Activates forced mode change. In forced mode charge pump  
mode change from 1.5x to 1x is attempted at the interval  
specified with the TIMER bits.  
0
R
0: forced mode changes disabled.  
1: forced mode changes disabled.  
Note: Vues above are typical and should not be used as product specification. Writing to TRESHOLD [7:6] bits by  
user overrides factory settings. Factory settings aren't user accessible.  
www.austriamicrosystems.com  
Revision 1.3  
63 - 85  
8.11 Instruction Set  
AS3661 has three independent programmable execution engines. All the program execution engines have their own program memory block allocated buser.  
Note that in order to access program memory the operation mode needs to be load program, at least for one of the three program execution engines. Prm  
execution is clocked with 32 768Hz clock. This clock can be generated internally or external 32 kHz clock can be connected to CLK32K pin. Usinextrnal clock  
enables synchronization of LED timing to the external clock signal.  
Supported instruction set is listed in the tables below:  
Table 71. LED Driver Instructions  
Bit Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
[8]  
Bit  
[7]  
Bit  
[6]  
Bit  
[5]  
Bit  
[4]  
Bit  
[3]  
Bit  
[2
Bit  
[1]  
Bit  
[0]  
LED Driver  
Instructions  
Compiler  
Command  
[15] [14] [13] [12] [11] [10] [9]  
pre-  
ramp1  
ramp2  
RMP  
RWV  
0
1
step time  
0
sign  
0
# of incremes  
scale  
pre-  
# of  
increments  
0
0
0
1
0
0
0
sign  
step time  
scale  
set_pwm1  
set_pwm2  
wait  
SPW  
SPV  
0
1
1
0
0
0
0
0
0
0
0
1
0
0
PWM value  
0
0
1
0
1
0
0
0
0
0
0
0
PWM value  
pre-  
scale  
WAIT  
0
time  
0
0
0
1. This opcode is used with numerical operands.  
2. This opcode is used with variables.  
Table 72. LED Mapping Instructions  
Bit Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
[8]  
Bit  
[7]  
Bit  
[6]  
Bit  
[5]  
Bit  
[4]  
Bit  
[3]  
Bit  
[2]  
Bit  
[1]  
Bit  
[0]  
LED Mapping  
Instructions  
Compiler  
Command  
[15] [14] [13] [12] [11] [10] [9]  
mux_ld_start  
mux_map_start  
mux_ld_end  
mux_sel  
MLS  
MMS  
MLE  
MSL  
MCL  
MMN  
MMP  
MLN  
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
1
0
0
1
1
1
SRAM address 0-95  
LED select  
mux_clr  
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
mux_map_next  
mux_map_prev  
mux_ld_next  
Table 72. LED Mapping Instructions  
Bit Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
[8]  
Bit  
[7]  
Bit  
[6]  
Bit  
[5]  
Bit  
[4]  
Bit  
[3]  
Bit  
[2]  
Bit  
[1]  
Bit  
[0]  
LED Mapping  
Instructions  
Compiler  
Command  
[15] [14] [13] [12] [11] [10] [9]  
mux_ld_prev  
mux_ld_addr  
mux_map_addr  
MLP  
MLA  
MMA  
1
1
1
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
0
0
0
0
1
SRAM address 0-95  
Table 73. Branch Instructions  
Bit Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
[8]  
Bit  
[7]  
Bit  
[6]  
Bit  
[5]  
Bit  
[4]  
Bit  
[3]  
Bit  
[2
Bit  
[1]  
Bit  
[0]  
Compiler  
Command  
Branch Instructions  
[15] [14] [13] [12] [11] [10] [9]  
rst  
RST  
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
branch1  
BRN  
loop count  
step umber  
branch2  
Int  
BRV  
1
0
0
0
0
0
0
1
1
step mber  
loop count  
INT  
1
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
end  
END  
int reset  
0
0
0
wafor trigger  
send a trigger  
E3  
trigger  
TRG  
1
1
1
0
ext.tr  
ext.tr  
ig  
x
x
E3  
E2  
E1  
X
X
E2  
E1  
ig  
0
0
0
0
jne  
jl  
JNE  
JL  
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
0
0
1
1
0
1
0
1
umber of instructions to be  
pped if the operation returns  
true  
variable1  
variable2  
jge  
je  
JGE  
JE  
1. This opcode is used with numerical operands.  
2. This opcode is used with variables.  
Note: x stands for ‘don’t care’  
Table 74. Data Transfer and Arithmetic Instructions  
Bit Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
Bit  
[8]  
Bit  
[7]  
Bit  
[6]  
Bit  
[5]  
Bit  
[4]  
Bit  
[3]  
Bit  
[2]  
Bit  
[1]  
Bit  
[0]  
Arithmetic  
Instructions  
Compiler  
Command  
[15] [14] [13] [12] [11] [10] [9]  
ld  
LD  
1
1
0
0
0
0
1
1
0
0
0
1
8-bit value  
8-bit value  
add1  
add2  
sub1  
sub2  
ADN  
target  
variable  
ADV  
SBN  
SBV  
1
1
1
0
0
0
0
0
0
1
1
1
1
1
1
1
0
1
0
0
0
0
0
0
0
variable1  
8-bit value  
variabl1  
varible2  
variable2  
1
1. This opcode is used with numerical operands.  
2. This opcode is used with variables.  
AS3661  
Datasheet - Detailed Description  
8.12 LED Driver Instructions  
8.12.1 RAMP (Numerical Operands)  
This is the instruction useful for smoothly changing from one PWM value into another PWM value on the LED1 to  
LED9 outputs, in other words generating ramps (with a negative or positive slope). AS3661 allows programming very  
fast and very slow ramps. Ramp instruction generates a PWM ramp, using the effective PWM value as a starting value.  
At each ramp step the output is incremented /decremented by one unit, unless the step time span is 0 or # of  
increments is 0. Time span for one ramp step is defined with prescale -bit [14] and step time -bits [13:9]. Prescale = 0  
sets 0.49 ms cycle time and prescale = 1 sets 15.6 ms cycle time; so the minimum time span for one step is 0.49 ms  
(prescale * step time span = 0.49ms x 1) and the maximum time span is 15.6 ms x 31 = 484ms/step If all the step tim
bits [13:9] are set to zero, output value is incremented / decremented during one prescale on the whole. Number of  
increment’s value defines how many steps will be taken during one ramp instruction: Increment maximum value is  
255d, which corresponds increment from zero value to the maximum value. If PWM reaches minimum/maximum val
(0/255) during the ramp instruction, ramp instruction will be executed to the end regardless of saturation. This eables  
ramp instruction to be used as a combined ramp & wait instruction. Ramp instruction is the wait instruction whethe  
increment bits [7:0] are set to zero.  
COMPILER COMMAND SYNTAX: RMP, prescale[1], step time[4], sign[1], number of increments[8
Table 75. RMP Parameter Description  
Name  
prescale  
step time  
sign  
Value  
Description  
0
1
Divides master clock (3768 Hz) by 16 = 204Hz -0.488 ms cycle time  
Divides master c2 768 Hz) by 512 = 64 Hz -> 15.625 ms cycle time  
One ramincrement done in (stp time) x (prescale).  
Increase PWM output  
0-31  
0
1
Decse PWM output  
Thnumer of incremenecrement cycles. Note: Value 0 takes the same  
time as incremeby 1, but it is the wait instruction.  
# of increments  
0-255  
8.12.1.1 RMP Application Examp
Let's say that the LED dimming is controlled according near scale and effective PWM value at the moment t=0  
is 140d (~55%,), as shown in the figure below, and we wat to reach a PWM value of 148d (~58%) at the moment t =  
1.5s. The parameters for the RAMP instruction wibe:  
Prescale = 1 (15.625 ms cycle time)  
Step time = 12 (step time span will be 12*5.625 ms = 187.5 ms)  
Sign = 0 (increase PWM output)  
Number of increments = 8 (tae 8 steps)  
COMPILER COMMAND SYNTX EXAMPLE: RMP, 1, 12, 0, 8;  
www.austriamicrosystems.com  
Revision 1.3  
67 - 85  
AS3661  
Datasheet - Detailed Description  
Figure 29. RAMP Instruction Example  
8.12.2 RAMP (Variables)  
Programming ramps with variables is very similar to programminramwith numerical operans. The only difference  
is that step time and number of increments are captured from vaable registers, when the instruction execution is  
started. If the variables are updated after starting the instruction execution, it will have no effet on instruction  
execution. Again, at each ramp step the output is incremecremented by oe unless step time is 0 or increment  
is 0. Time span for one step is defined with prescale and stetime bits. Step time is defined with variable A, B, C or D.  
Variables A, B and C are set with ld-instruction. Variable D is global variable ancan be set by writing the VARIABLE  
register (address 0x3C). LED TEST ADC register (address 0x42) can be useas a source for the variable D, as well.  
Note: Variable A is the only local variable which cabe rad throughout tseril bus. Of course, the variable stored in  
3CH can be read (and written), too. Setting regiter 0x06, 0x07, or 0x0it LOG_EN high/low sets logarithmic (1) or  
linear ramp (0). By using the logarithmic ramsettng the visual eft appears like a linear ramp, because the human  
eye behaves in a logarithmic way.  
COMPILER COMMAND SYNTAX: RW, prescale[1], sign[1], tep time[2], number of increments[2];  
Table 76. RWV Parameter Descriptio
Name  
Value  
Description  
Divides mastr clock (32 768 Hz) by 16 = 2048 Hz -> 0.488 ms cycle time  
Divdes master clock (32 768 Hz) by 512 = 64 Hz -> 15.625 ms cycle time  
Increase PWM output  
0
1
0
1
prescale  
sign  
Decrease PWM output  
One ramp increment done in (step time) x (prescale).  
Step time is loaded with the value (5 LSB bits) of the variable defined below.  
1
2
3
local variable A  
local variable B  
local variable C  
step time  
0-3  
register address 3CH variable D value, or register address 42H  
value.  
4
The value of the variable should be from 00001b to 11111b (1d to 31d) for  
correct operation.  
www.austriamicrosystems.com  
Revision 1.3  
68 - 85  
AS3661  
Datasheet - Detailed Description  
Table 76. RWV Parameter Description  
Name  
Value  
Description  
The number of increment/decrement cycles. Value is taken from variable  
defined below:  
0
1
2
local variable A  
local variable B  
local variable C  
# of increments  
0-3  
register address 0x3C variable D value, or register address 0x42  
value.  
3
8.12.2.1 RWV Application Example  
Let's say that the LED dimming is controlled according to the linear scale and effective PWM value at the moment t=0  
is 0d (0%,) and we want to reach a PWM value of 255d (100%) at the moment t = 3s. The parameters for the RMP  
instruction will be:  
Prescale = 0 (0.488 ms cycle time)  
Step time = 4 (use variable D in register 0x3C with a value of 24d)  
Sign = 0 (increase PWM output)  
Number of increments = 0 (use local variable A which must bloadd with the value 25d
COMPILER COMMAND SYNTAX EXAMPLE: RMP, 0, 0,
The example above gives us a ramp time of 2.987s (tr = 0.48ms * 24 * 255).  
Figure 30. Ramp Instruction Example with Variabes  
8.12.3 SET PWM (Numrical Operands)  
This instruction is ed fsetting the PWM value on the outputs LED1 to LED9 without any ramps. Set PWM output  
value from 0 to 255 wth PWM value bits [7:0]. Instruction execution takes sixteen 32 kHz clock cycles (=488µs) .  
COMPICOMMAND SYNTAX: SPW, PWM Value[8];  
Tale 77. SPW Parameter Description  
Name  
Value  
Description  
PWM Value  
0-255  
PWM output duty cycle 0 - 100%  
www.austriamicrosystems.com  
Revision 1.3  
69 - 85  
AS3661  
Datasheet - Detailed Description  
8.12.3.1 SPW Application Example  
The SPW command can be used to set the PWM duty cycle of the program execution engine. In the following example  
we want to set the duty cycle of the PWM output to 55% like in the ramp example in the previous section. The right  
PWM value can be calculated with the following formula:  
PWM value = (Duty Cycle * 255 / 100) = 55% * 255 / 100 = 140.  
The predefined PWM value can be used as a starting point for dimming LEDs for example.  
COMPILER COMMAND SYNTAX: SPW, 140;  
8.12.4 SET PWM (Variables)  
This instruction is used for setting the PWM value on the outputs LED1 to LED9 without any ramps. In comparison to  
the SPW command, this command is in combination with variables similar to the RWM example in one of the previou
sections.  
COMPILER COMMAND SYNTAX: SPV, Variable[2];  
Table 78. SPW Parameter Description  
Name  
Value  
Description  
0
1
2
3
local variable A  
local variable B  
Variable  
0-3  
global variable C  
register adCH variable D aue, or register address 42H value.  
8.12.4.1 SPV Application Example  
The purpose of the SPV command is basically the saone like with the SPW command in the previous section. The  
only difference is that this command allows the user the control the PWduty cycle with the variables of the chip.  
COMPILER COMMAND SYNTAX EXAMPL: SPW, 0;  
The example above shows the control of te duty cycle with the loal variable A. If the local variable is for example  
loaded with a value of 100, the duty cye of the PWM output set to 39.2%.  
8.12.5 WAIT  
When a wait instruction is executed, the engine is et in a wait status and the PWM values on the outputs are frozen.  
This can be used for example to keep the LEDs eablefor a certain period of time before another up/down dimming  
process is being initiated.  
COMPILER COMMAND SYNTAX: WAIT, precale[1], time[5];  
Table 79. WAIT Parameter Description  
Name  
Pre-scale  
time  
Value  
0
Description  
Divide master clock (32 768 Hz) by 16 which means 0.488 ms cycle time.  
Divide master clock (32 768 Hz) by 512 which means 15.625 ms cycle time.  
Total wait time will be = (time) x (prescale). Maximum 484 ms, minimum 0.488 ms.  
1
1-31  
8.12.5.1 WAIT Appication Example  
In the examplshown below we want to have a target wait time of 125ms after dimming up the LEDs. In order to get  
the 100elay we select a prescaler value “1”, which gives a cycle time of 15.625ms. If we divide the 100ms by the  
cle timwe get the right value for the time parameter which is 8.  
COPILER COMMAND SYNTAX EXAMPLE: WAIT, 1, 8;  
www.austriamicrosystems.com  
Revision 1.3  
70 - 85  
AS3661  
Datasheet - Detailed Description  
8.13 LED Mapping Instructions  
These instructions define the engine-to-LED mapping. The mapping information is stored in a table, which is stored in  
the SRAM (program memory of the AS3661). AS3661 has three program execution engines which can be mapped to  
9 LED drivers or to one GPO pin. One engine can control one or multiple LED drivers. The first part of the program  
memory of AS3661is usually used for LED driver programs of each sequencer. The LED mapping is usually put at the  
end of the program memory where the programmable multiplexer, shown in the block diagram below, gets the  
information which LED must be connected to what sequencer output.  
Figure 31. LED Mapping Memory allocation  
In order to control and define the mapping of the LEDs there are totally en instructions for the engine-to-LED-driver  
control: mux_ld_start, mux_map_start, mux_ld_ed, mux_sel, muxlr, mx_map_next, mux_map_prev, mux_ld_next,  
mux_ld_prev, mux_ld_addr and mux_map_adr. With these instructios it is also possible to change the LED mapping  
from one mapping to another mapping, whch has been defined in he LED mapping table, forth and back to create  
again more complex light patterns.  
8.13.1 MUX_LD_START  
Mux_ld_start defines the start of the mapping tabllocation in the memory.  
COMPILER COMMAND SYNTAX: MLS, SRAM adress[7];  
Table 80. MLS Parameter Description  
Name  
Value  
Description  
SRAM address  
0-95  
Mapping table start address  
8.13.1.1 MLS Application Example  
In this example we want set he start address for the LED mapping table to 80d.  
COMPILER COMMAND SYNTAX EXAMPLE: MLS, 80;  
8.13.2 MUX_LD_ED  
Mux_ld_end dfinethe end of the mapping table location in the memory. It is very important to define the end address  
of the mng table, otherwise it could happen if you use relative mapping commands, that the address pointer points  
to a posn utside the mapping table due to the missing end address.  
COPILER COMMAND SYNTAX: MLE, SRAM address[7];  
Table 81. MLE Parameter Description  
Name  
Value  
Description  
SRAM address  
0-95  
Mapping table end address  
www.austriamicrosystems.com  
Revision 1.3  
71 - 85  
AS3661  
Datasheet - Detailed Description  
8.13.2.1 MLE Application Example  
In this example we want to set the end address for the LED mapping table to 85d.  
COMPILER COMMAND SYNTAX EXAMPLE: MLE, 85;  
8.13.3 MUX_MAP_START  
Mux_map_start defines the mapping table start address in the memory and the first row of the table will be activated  
(mapped) at the same time.  
COMPILER COMMAND SYNTAX: MMP, SRAM address[7];  
Table 82. MMP Parameter Description  
Name  
Value  
Description  
SRAM address  
0-95  
Mapping table start address  
8.13.3.1 MMP Application Example  
In the example we would like to set the start address to 80d. In addition to the definition of the stat adess of the  
mapping table the first LED mapping defined at address 80d gets activated. The difference to the MSX_D_START  
command, described in one of the previous sections, is that it only defines the start address withot actiating the LED  
mapping.  
COMPILER COMMAND SYNTAX EXAMPLE: MMP, 80;  
8.13.4 MUX_SEL  
With mux_sel instruction one, and only one, LED driver (or e GPO-pin) can be conected to a program execution  
engine. Connecting multiple LEDs to one engine is done with he mapping table. fter the mapping has been released  
from an LED, PWM register value will still control the LED brightness. If the apping is released from the GPO pin,  
serial bus control takes over the GPO state.  
COMPILER COMMAND SYNTAX: MSL, LED Sect[6]  
Table 83. MSL Parameter Description  
Name  
Value  
Description  
no drivers selected  
LED1 selected  
LED2 selected  
....  
LED Select  
0-16  
0
1
2
....  
1
GPO  
8.13.4.1 MSL Application Exmpl
In this example we would like to use the MSL command to map a single LED to a execution engine. Usually we do this  
with the mapping table buin case we want to use only a single LED on one sequencer it is possible to use the MSL  
command. The example ommand below shows the mapping of LED2 to the program execution engine.  
COMPILER COMANSYNTAX EXAMPLE: MSL, 2;  
8.13.5 MUX_CLR  
Mux_clr clearengne-to-driver mapping. After the mapping has been released from an LED, PWM register value will  
still conthe LED brightness. If the mapping is released from the GPO pin, serial bus control takes over the GPO  
stte.  
COPILER COMMAND SYNTAX: MCL;  
This command doesn’t support any parameters.  
www.austriamicrosystems.com  
Revision 1.3  
72 - 85  
AS3661  
Datasheet - Detailed Description  
8.13.6 MUX_MAP_NEXT  
This instruction sets the next row active in the mapping table each time it is called. For example, if the 1st row is active  
at this moment, after mux_map_next instruction call the 2rd row will be active like in the block diagram shown in  
Figure 32 below.  
Figure 32. MUX_MAP_NEXT Command  
If the mapping table end address is reached, activation will l to the mapping table tart address next time when the  
mux_map_next instruction is called. Engine will not push a new PWM value to thLED driver output before set_pwm  
or ramp instruction is executed. If the mapping habeen released from an LE, the value in the PWM register will still  
control the LED brightness. If the mapping is released fom the GPO perial bus control takes over the GPO state.  
COMPILER COMMAND SYNTAX: MMN;  
This command doesn’t support any parameters
8.13.7 MUX_MAP_PREV  
This instruction sets the previous row active in the mapble each time it is called. For example, if the 3rd row is  
active at this moment, after mux_map_prev instruction call the 2nd row will be active like in block diagram shown in  
Figure 33 below.  
Figure 33. MUX_MAP_PREV Command  
Figure 34.  
www.austriamicrosystems.com  
Revision 1.3  
73 - 85  
AS3661  
Datasheet - Detailed Description  
If the mapping table start address is reached, activation will roll to the mapping table end address next time the  
mux_map_prev instruction is called. Engine will not push a new PWM value to the LED driver output before set_pwm  
or ramp instruction is executed. If the mapping has been released from an LED, the value in the PWM register will still  
control the LED brightness. If the mapping is released from the GPO pin, serial bus control takes over the GPO state.  
COMPILER COMMAND SYNTAX: MMP;  
This command doesn’t support any parameters.  
8.13.8 MUX_LD_NEXT  
Similar than the mux_map_next instruction, but only the index pointer will be set to point to the next row i.e. no  
mapping will be set and the engine-to-LED-driver connection will not be updated.  
COMPILER COMMAND SYNTAX: MLN;  
This command doesn’t support any parameters.  
8.13.9 MUX_LD_PREV  
Similar than the mux_map_prev instruction, but only the index pointer will be set to point to the previos row i.e. no  
mapping will be set and the engine-to-LED-driver connection will not be updated.  
COMPILER COMMAND SYNTAX: MLP;  
This command doesn’t support any parameters.  
8.13.10 MUX_MAP_ADDR  
Mux_map_addr sets the index pointer to point the mappinrow defined by its [6:0] and sets the row active.  
Engine will not push a new PWM value to the LED driver ouut before set_pwm or amp instruction is executed. If the  
mapping has been released from an LED, the value in the PM register will till ontrol the LED brightness. If the  
mapping is released from the GPO pin, serial bus control takes over the GPstate  
COMPILER COMMAND SYNTAX: MMA, SRAM addres[7];.  
Table 84. MMA Parameter Description  
Name  
Value  
Description  
SRAM address  
0-95  
Any SRM address containing mapping data.  
8.13.10.1 MMA Application Example  
In this example we asume the we have aleady defned e start and end address of the LED mapping table. Now we  
want to set address 83d within the addresrange of the map table active.  
COMPILER COMMAND SYNTAX EXAMPLEMMA, 83;  
8.13.11 MUX_LD_ADDR  
Mux_ld_addr sets the index pointr to point the mapping table row defined by bits [6:0], but the row will not be set  
active.  
COMPILER COMMAND SYTAXMLA, SRAM address;  
Table 85. MLA Parameter Description  
Name  
Value  
Description  
SRAM address  
0-95  
Any SRAM address containing mapping data.  
www.austriamicrosystems.com  
Revision 1.3  
74 - 85  
AS3661  
Datasheet - Detailed Description  
8.14 Branch Instructions  
8.14.1 RST  
RST instruction resets Program Counter register (address 37H, 38H, or 39H) and continues executing the program  
from the program start address defined in 4C-4E. Instruction takes sixteen 32 kHz clock cycles.  
COMPILER COMMAND SYNTAX: RST;  
This command doesn’t support any parameters.  
Note: The default value for all program memory registers is 0000H, which is the RST instruction.  
8.14.2 BRANCH (Numerical)  
Branch instruction is mainly indented for repeating a portion of the program code several times. Branch instructio
loads step number value to program counter. Loop count parameter defines how many times the instructions insde t
loop are repeated. AS3661 supports nested looping i.e. loop inside loop. The number of nested loops is not limied.  
Instruction takes sixteen 32 kHz clock cycles.  
COMPILER COMMAND SYNTAX: BRN, loop count[6], step number[7];  
Table 86. BRN Parameter Description  
Name  
Accepted Value  
Description  
loop count  
step number  
0-63  
0-95  
The number ooops be done. 0 means n infinite loop  
The number to be loaded to program counter  
8.14.2.1 BRN Application Example  
In this application example we would like to create an infinite loop, which meas the loop will never stop. The code we  
want to repeat has a start address of 10d. At the end of he code we warepeat we put the BRN command with the  
program counter address 10d. Once the program execution enginexetethe BRN command the program counter  
jumps back to address 10d and starts exeutg the code from this adress until it reaches again the BRN command.  
COMPILER COMMAND SYNTAX: EXAMLE: BRN, 0, 10;  
Figure 35. BRN Example for executiongine 1  
www.austriamicrosystems.com  
Revision 1.3  
75 - 85  
AS3661  
Datasheet - Detailed Description  
8.14.3 BRANCH (Variables)  
The BRANCH command for variables has basically the same functionality like the numerical command. The only  
difference is that the loop count is controlled with variables instead of having a fixed number.  
COMPILER COMMAND SYNTAX: BRV, step number[7], loop count[2];  
Table 87. BRN Parameter Description  
Name  
Accepted Value  
Description  
step number  
0-95  
The step number to be loaded to program counter  
Selects the variable for step number value. Step number is loaded with the  
value of the variable defined below  
0
1
2
3
local variable A  
local variable B  
loop count  
0-3  
local variable C  
register address 3CH variable D value, or registeaddess 42H value  
8.14.4 INT  
Send interrupt to processor by pulling the INT pin down and settng corsponding status bit hig. Interrupt can be  
cleared by reading interrupt bits in STATUS/INTERRUPT registeat addess 3A.  
COMPILER COMMAND SYNTAX: INT;  
This command doesn’t support any parameters.  
8.14.5 END  
End program execution. Instruction takes sixteen 2 kHclock cycles.  
COMPILER COMMAND SYNTAX: END, int[1], eset[1];  
Table 88. END Parameter Description  
Name Value  
Dscription  
0
No errupt will be sWM register values will remain intact.  
Reset program counter value to 0 and send interrupt to processor by pulling the INT pin down and  
setting corresponding status bihigh o notify that program has ended. PWM register values will  
remain intact. Interrupt can be clereby reading interrupt bits in STATUS/INTERRUPT register at  
address 3A.  
int  
1
0
Reset program cuntevalue to 0 and hold. PWM register values will remain intact.  
Reset program countelue to 0 and hold. PWM register values of the non-mapped drivers will  
remain. PWM reister values of the mapped drivers will be set to "0000 0000". On completion of int  
instruction witthis it set to "1" the master fader registers are set to zero as follows: Program  
execution engie 1 sets MASTER FADER 1 (48H) to zero, engine 2 sets MASTER FADER 2 (49H) to  
zero and engine 3 sets MASTER FADER 3 (4AH) to zero.  
Reset  
1
8.14.5.1 END Application Example  
The example code elow sends an interrupt to the processor and resets the program counts to 0. The program  
execution engine is st on hold.  
COMPILER COMMAND SYNTAX EXAMPLE: END, 1, 0;  
8.4.6 IGGER  
Waior send triggers can be used to e.g. synchronize operation between the program execution engines. Send trigger  
instrucion takes sixteen 32 kHz clock cycles and wait for trigger takes at least sixteen 32 kHz clock cycles. The  
receiving engine stores the triggers which have been sent. Received triggers are cleared by wait for trigger instruction.  
Wait for trigger instruction is executed until all the defined triggers have been received (note: several triggers can be  
defined in the same instruction).  
www.austriamicrosystems.com  
Revision 1.3  
76 - 85  
AS3661  
Datasheet - Detailed Description  
External trigger input signal must stay low for at least two 32 kHz clock cycles to be executed. Trigger output signal is  
three 32 kHz clock cycles long. External trigger signal is active low, i.e. when trigger is send/received the pin is pulled  
to GND. Sent external trigger is masked, i.e. the device which has sent the trigger will not recognize it. If send and wait  
external trigger are used on the same instruction, the send external trigger is executed first, then the wait external  
trigger.  
COMPILER COMMAND SYNTAX: TRG, wait for trigger[6], send a trigger[6]  
Table 89. TRG Parameter Description  
Name  
Value  
Description  
Wait for trigger from the engine(s). Several triggers can be defined in the  
same instruction. Bit [7] engages engine 1, bit [8] engine 2, bit [9] engine 3  
and bit [12] is for external trigger I/O. Bits [10] and [11] are not in use.  
wait for trigger  
0-31  
Send a trigger to the engine(s). Several triggers can be defined in the sam
instruction. Bit [1] engages engine 1, bit [2] engine 2, bit [3] engine 3 ad bit  
[6] is for external trigger I/O. Bits [4] and [5] are not in use.  
send a trigger  
0-31  
8.14.6.1 TRG Application Example  
In this example we want to wait/receive a trigger from program execution engine 1.  
COMPILER COMMAND SYNTAX EXAMPLE: TRG, 2, 0;  
8.14.7 JNE/JL/JGE/JE  
AS3661 instruction set includes the following conditional jstructions: jne (jmp if not equal); jge (jump if greater  
or equal); jl (jump if less); je (jump if equal). If the condition rue a certain number of instructions will be skipped (i.e.  
the program jumps forward to a location relative to the preset location). If condion is false then the next instruction  
will be executed.  
COMPILER COMMAND SYNTAX: JNE, number of insuctions...[5], Vble1[2], Variable2[2];  
COMPILER COMMAND SYNTAX: JL, number of nstructions...[5ariale1[2], Variable2[2];  
COMPILER COMMAND SYNTAX: JGE, umbr of instructions.[5], Vriable1[2], Variable2[2];  
COMPILER COMMAND SYNTAX: Eumber of instructions.[5], Variable1[2], Variable2[2];  
Table 90. JNE/JL/JGE/JE Parameter scription  
Name  
Value  
Description  
number of instructions to be  
skipped if the operation  
returns true.  
The number of instructions to be skipped when the statement is true.  
Note: value 0 means redundant code.  
0-31  
Defines the variable to be used in the test:  
local variable A  
0
1
2
Variable1  
Variale2  
0-
0-3  
local variable B  
global variable  
C3  
register address 3CH variable, or register address 42H value  
Defines the variable to be used in the test:  
local variable A  
0
1
local variable B  
2
global variable  
C3  
register address 3CH variable, or register address 42H value  
8.14.7.1 JNE Application Example  
In the following example we compare local variable A with local variable B. If the value of the two registers is not equal  
the command will skip three instructions.  
COMPILER COMMAND SYNTAX EXAMPLE: JNE, 3, 0,1;  
www.austriamicrosystems.com  
Revision 1.3  
77 - 85  
AS3661  
Datasheet - Detailed Description  
8.15 Arithmetic Instructions  
8.15.1 LD  
This instruction is used to assign a value into a variable; the previous value in that variable is overwritten. Each of the  
engines have two local variables, called A and B. The variable C is a global variable which is shared with all three  
program execution engines.  
COMPILER COMMAND SYNTAX: LD, Target Variable[2];  
Table 91. LD Parameter Description  
Name  
Value  
Description  
variable A  
0
1
2
Target Variable  
8-bit value  
0-2  
variable B  
variable C  
0-255  
variable value  
8.15.1.1 LD Application Example  
In this example we want to load variable B with a value of 100;  
COMPILER COMMAND SYNTAX EXAMPLE: LD, 1, 100;  
8.15.2 ADD (Numerical Operands)  
Operator either adds the 8-bit value to the current value of ttarget variable.  
COMPILER COMMAND SYNTAX: ADN, Target Variable,[2], 8-Bit value[8];  
Table 92. ADN Parameter Description  
Name  
Value  
Description  
Variable value  
variable A  
8-bit value  
0-255  
0
1
Target Variable  
Variable1  
0-2  
0-3  
variable B  
2
variable C  
0
local variable A  
1
local variable B  
global variable  
3  
0
register address 3CH variable, or register address 42H value  
local variable A  
1
local variable B  
0-3  
Variable2  
2
global variable  
C3  
register address 3CH variable, or register address 42H value  
8.15.2.1 ADApplication Example  
In this exple we would like to add a value of100 d to variable ‘A’, which is loaded with a value of 10d. The result of  
the opeon s 110d stored in variable ‘A’.  
COMPILER COMMAND SYNTAX EXAMPLE: ADN, 0, 100;  
8.15.3 ADD (Variables)  
This command adds the value of the variable 1 (A, B, C or D) to the value of the variable 2 (A, B, C or D) and stores the  
result in the register of variable A, B or C which is defined as target variable. Variables overflow from 255 to 0.  
www.austriamicrosystems.com  
Revision 1.3  
78 - 85  
AS3661  
Datasheet - Detailed Description  
COMPILER COMMAND SYNTAX: ADV, Target Variable[2], Variable1[2], Variable2[2];  
Table 93. ADV Parameter Description  
Name  
Value  
Description  
variable A  
0
1
Target Variable  
0-2  
variable B  
2
variable C  
0
local variable A  
1
local variable B  
global variable  
Variable1  
Variable2  
0-3  
0-3  
2
C3  
0
register address 3CH variable, or register address 42H vaue  
local variable A  
1
local variable B  
2
global variable  
C3  
register addrss 3CH variable, or registaddrss 42H value  
8.15.3.1 ADV Application Example  
In this example we want to add variable ‘A’ to variable ‘B’. esult should be sored in variable ‘C’.  
COMPILER COMMAND SYNTAX EXAMPLE: ADV, 2, 0, 1
8.15.4 SUB (Numerical)  
SUB Operator either subtracts the 8-bit value from the urrent value of target variable.  
COMPILER COMMAND SYNTAX: SBN, Taget ariable[2], 8-bit lue[8];  
Table 94. SBN Parameter Description  
Name  
Value  
Description  
8-bit value  
0-255  
variable value  
0
1
2
variable A  
Target Variable  
0-2  
variable B  
variable C  
8.15.4.1 SBN Application Example  
In this example we would like to sbtra50d from local variable ‘A’. The result is stored in variable ‘A’.  
COMPILER COMMAND SYNTX EXAMPLE: SBN, 0, 50;  
8.15.5 SUB (Variables
The SBV commad subracts the value of the variable 2 (A, B, C or D) from the value of the variable 1 (A, B, C or D)  
and stores the resuin the register of target variable (A, B or C). Variables overflow from 0 to 255.  
COMPILER COMMAND SYNTAX: SBV, Target Variable[2], Variable1[2], Variable2[2];  
Table 95BV Parameter Description  
Name  
Value  
Description  
variable A  
0
1
2
Target Variable  
0-2  
variable B  
variable C  
www.austriamicrosystems.com  
Revision 1.3  
79 - 85  
AS3661  
Datasheet - Detailed Description  
Table 95. SBV Parameter Description  
Name  
Value  
Description  
0
1
local variable A  
local variable B  
global variable  
Variable1  
0-3  
2
C3  
0
register address 3CH variable, or register address 42H value  
local variable A  
1
local variable B  
Variable2  
0-3  
2
global variable  
C3  
register address 3CH variable, or register address 42H vaue  
8.15.5.1 SBV Application Example  
In this example we would like to subtract variable ‘A’ from variable ‘B’. The result should be stored n vaable ‘C’.  
COMPILER COMMAND SYNTAX EXAMPLE: SBV, 2, 0, 1;  
www.austriamicrosystems.com  
Revision 1.3  
80 - 85  
AS3661  
Datasheet - Typical Application  
9 Typical Application  
Figure 36. Typical Application 3 RGB LEDs  
O P G  
D N
2 E  
D  
- 1 C  
4 B  
+ 1 C  
5 B  
- 2
4 A  
+ 2 C  
5 A  
www.austriamicrosystems.com  
Revision 1.3  
81 - 85  
AS3661  
Datasheet - Typical Application  
9.1 Recommended External Components  
The AS3661 requires 4 external capacitors for proper operation. Surface-mount multi-layer ceramic capacitors are  
recommended. Tantalum and aluminium capacitors are not recommended because of their high ESR. For the flying  
capacitors (C1 and C2) multi-layer ceramic capacitors should always be used. These capacitors are small, inexpensive  
and have very low equivalent series resistance (ESR <20mtyp.). Ceramic capacitors with X7R or X5R temperature  
characteristic are preferred for use with the AS3661. These capacitors have tight capacitance tolerance (as good as  
±10%) and hold their value over temperature (X7R: ±15% over -55°C to 125°C; X5R: ±15% over -55°C to 8 5°C).  
Capacitors with Y5V or Z5U temperature characteristic are generally not recommended for use with the AS3661.  
Capacitors with these temperature characteristics typically have wide capacitance tolerance (+80%, -20%) and vary  
significantly over temperature (Y5V: +22%, -82% over -30°C to +85°C range; Z5U: +22%, -56% over +10°C to +85°C  
range). Under some conditions, a nominal 1µF Y5V or Z5U capacitor could have a capacitance of only 0.1µF. Such  
detrimental deviation is likely to cause Y5V and Z5U capacitors to fail to meet the minimum capacitance requirement
of the AS3661. For proper operation it is necessary to have at least 0.24 µF of effective capacitance for each of the  
flying capacitors under all operating conditions. The output capacitor CVCPOUT directly affects the magnitude of he  
output ripple voltage. In general, the higher the value of CVCPOUT, the lower the output ripples magnitude. For pper  
operation it is recommended to have at least 0.50µF of effective capacitance for CVBAT and CVCPOUunder all  
operating conditions. The voltage rating of all four capacitors should be 6.3V; 10V is recommende. Reommended  
External Components below lists recommended external components from some leading ceramic caacitor  
manufacturers. It is strongly recommended that the AS3661 circuit be thoroughly evaluated early the design-in  
process with the mass-production capacitors of choice. This will elp ensure that any variabilitin capacitance does  
not negatively impact circuit performance.  
Figure 37. Recommended External Components  
ndor  
Model  
1µF for CVBAT and CVCPOUT  
C1005X5R1A105K  
LMK105BJ105KV-F  
ECJ0EB1A105M  
Type  
Voltge Ring  
0V  
Package Size  
0402  
Ceramic X5R  
CeramiXR  
Ceramic X5R  
TDK  
Taiyo ude10
Panason10V  
0402  
0402  
Ceraic X5R, array  
oo  
ECJUVBPA105  
Pnasoic 10V  
0504  
470F for CFLY1 and CFLY2  
C1005X5R1A474K  
LMK105BJ474KV-F  
ECJ0EB0J474K  
Ceramic X5R  
Ceramic X5
Ceramic X5R  
DK  
10V  
0402  
0402  
0402  
Taiyo Yuden 10V  
Panasonic 6.3V  
User defined. Note that D7, D8 and D9 outputs are  
powered from VBAT when specifying the LEDs.  
LEDs  
www.austriamicrosystems.com  
Revision 1.3  
82 - 85  
AS3661  
Datasheet - Package Drawings and Markings  
10 Package Drawings and Markings  
Figure 38. WL-CSP-25 (2.285x2.285mm) 0.4mm pitch Marking  
Pin A1  
Indicator  
Top View (through)  
Bottom View (Ball Side)  
5 4 3  
2 1  
1
2
3
4
5
A
B
C
A
B
C
A
B
C
A
B
C
AS3661  
<Code>  
D
E
D
E
D
E
D
E
1
2
3
4
5
5
4
3
2
1
Note:  
Line 1:  
Line 2:  
Line 3:  
austriamicrosystems logo  
AS3661  
<Code>  
Encoded Datecode (4 characters)  
Figure 39. WL-CSP-25 (2.285x2.285mm) 0.4mm pitch Paimensions  
www.austriamicrosystems.com  
Revision 1.3  
83 - 85  
AS3661  
Datasheet - Ordering Information  
11 Ordering Information  
The devices are available as the standard products shown in Table 96.  
Table 96. Ordering Information  
Ordering Code  
Marking  
Desciption  
Delivery Form  
Package  
WL-CSP-25  
(2.285x2.285mm)  
0.4mm pitch  
AS3661-BWLT  
AS3661  
Programmable 9-channel LED Driver  
Tape and Reel  
Note: All products are RoHS compliant and austriamicrosystems green.  
Buy our products or get free samples online at ICdirect: http://www.austriamicrosystems.com/ICdirect  
Technical Support is found at http://www.austriamicrosystems.com/Technical-Support  
For further information and requests, please contact us mailto:sales@austriamicrosystem.co
or find your local distributor at http://www.austriamicrosystems.com/distributor  
www.austriamicrosystems.com  
Revision 1.3  
84 - 85  
AS3661  
Datasheet - Ordering Information  
Copyrights  
Copyright © 1997-2012, austriamicrosystems AG, Tobelbaderstrasse 30, 8141 Unterpremstaetten, Austria-Europe.  
Trademarks Registered ®. All rights reserved. The material herein may not be reproduced, adapted, merged,  
translated, stored, or used without the prior written consent of the copyright owner.  
All products and companies mentioned are trademarks or registered trademarks of their respective companies.  
Disclaimer  
Devices sold by austriamicrosystems AG are covered by the warranty and patent indemnification provisions appearing  
in its Term of Sale. austriamicrosystems AG makes no warranty, express, statutory, implied, or by description regarding  
the information set forth herein or regarding the freedom of the described devices from patent infringement.  
austriamicrosystems AG reserves the right to change specifications and prices at any time and without notice.  
Therefore, prior to designing this product into a system, it is necessary to check with austriamicrosystems AG f
current information. This product is intended for use in normal commercial applications. Applications requiring  
extended temperature range, unusual environmental requirements, or high reliability applications, sucas military,  
medical life-support or life-sustaining equipment are specifically not recommended without additionl prcessing by  
austriamicrosystems AG for each application. For shipments of less than 100 parts the manufacturing ow might show  
deviations from the standard production flow, such as test flow or tet location.  
The information furnished here by austriamicrosystems AG is bieved tbe correct and accurat. However,  
austriamicrosystems AG shall not be liable to recipient or any thirpartfor any damags, incuding but not limited to  
personal injury, property damage, loss of profits, loss of uinterruption of business or indirect, special, incidental or  
consequential damages, of any kind, in connection with or ng out of the furning, performance or use of the  
technical data herein. No obligation or liability to recipient or ny third party shall arisor flow out of  
austriamicrosystems AG rendering of technical or other services.  
Contact Information  
Headquarters  
austriamicrosystemAG  
Tobelbaderstrasse 30  
A-8141 Unterremaetten, Austria  
Tel: +43 3136 500 0  
Fx: +43 0) 136 525 01  
For ales Offices, Distributors and Representatives, please visit:  
http://www.austriamicrosystems.com/contact  
www.austriamicrosystems.com  
Revision 1.3  
85 - 85  
Mouser Electronics  
Authorized Distributor  
Click to View Pricing, Inventory, Delivery & Lifecycle Information:  
ams:  
AS3661-BWLT AS3661-BWLT-500  

相关型号:

AS3661-BWLT

Programmable 9-channel LED Dr iver
AMSCO

AS3665

9 Channel Advanced Command Driven RGB/White LED Driver
AMSCO

AS3665-ZWLT

9 Channel Advanced Command Driven RGB/White LED Driver
AMSCO

AS3665_04

9 Channel Advanced Command Driven RGB/White LED Driver
AMSCO

AS3668

4 Channel Breathlight Controller
AMSCO

AS3668-BQFT

4 Channel Breathl ight Cont rol ler
AMSCO

AS3668-BWLT

4 Channel Breathlight Controller
AMSCO

AS3668_07

4 Channel Breathlight Controller
AMSCO

AS3675

Flexible Lighting Management Unit
AMSCO

AS3675-ZWLT

Flexible Lighting Management Unit
AMSCO

AS3676

Flexible Lighting Management
AMSCO

AS3676-ZWLT

Flexible Lighting Management
AMSCO