MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Gain and Attenuation Volume Controller IC One Set of Stereo Input, Low voltage Gain and Attenuation 15~-79dB FEATURES APPLICATIONS ‧Operation range: 2.7V~5.5V ‧Low power consumption ‧Gain/Attenuation: 15dB to –79dB at 1dB/step ‧Housed in 8 pin SOP package ‧I2C interface ‧Multimedia system ‧Hi-Fi audio system ‧MP3, PDA ‧Cross-reference PT2257, PT2259 DESCRIPTION The MS6257 is the stereo audio volume controller IC. It uses CMOS technology specially for the low voltage application with low noise, rail-to-rail output. The MS6257 provide an I2C control interface with gain / attenuation range of 15dB to –79dB, 1dB/step. The initial condition is set to be maximum attenuation –79dB and mute on mode when the power is up. PIN CONFIGURATION Symbol Pin Description L-IN 1 Left channel input L-OUT 2 Left channel output VSS 3 Ground SDA 4 I2C data input SCL 5 I2C clock input VDD 6 Positive supply voltage R-OUT 7 Right channel output R-IN 8 Right channel input L-IN 1 L-OUT 2 VSS 3 8 R-IN 7 R-OUT MS6257 6 VDD SDA 4 5 SCL BLOCK DIAGRAM L-IN 1dB/STEP -1dB/STEP -10dB/STEP L-OUT Serial Bus Decoder and Latches R-IN 1dB/STEP -1dB/STEP -10dB/STEP R-OUT REF Reference Circuit I2C Interface SDA REV 1 SCL 1 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC ORDERING INFORMATION Package Part number Packaging Marking Transport Media 8-Pin SOP MS6257TR MS6257 2.5k Units Tape and Reel 8-Pin SOP MS6257U MS6257 100 Units Tube 8-Pin SOP (lead free) MS6257GTR MS6257G 2.5k Units Tape and Reel 8-Pin SOP (lead free) MS6257GU MS6257G 100 Units Tube ABSOLUTE MAXIMUM RATINGS Symbol Parameter Rating Unit 6 V -4500 to 4500 VDD Supply Voltage VESD Electrostatic Handling TSTG Storage Temperature Range -65 to 150 V ℃ TA Operating Ambient Temperature Range -40 to 85 ℃ TJ Maximum Junction Temperature 150 ℃ TS Soldering Temperature, 10 seconds 260 ℃ RTHJA Thermal Resistance from Junction to Ambient in Free Air SOP8 210 ℃/W OPERATING RATINGS Symbol VDD REV 1 Parameter Supply Voltage 2 Min Typ Max Unit 2.7 - 5.5 V www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC 5V ELECTRICAL CHARACTERISTICS (VDD=5.0V, VSS=0V, Attenuation=0dB, Gain=0dB, f=1KHz, VO=0dBV; unless otherwise specified) Symbol Parameter Conditions Min Typ Max Unit DC Characteristics IQ Quiescent current - 3.1 3.5 mA AGA Gain/Attenuation Max gain - 15 - dB Max attenuation - -79 - dB ASTEP Gain/Attenuation step - 1 - dB EGA Gain/Attenuation step error - 0.3 - dB EIGA Interchannel gin/attenuation error - 0.3 - dB CS Channel separation 120 130 - dB MUTE Mute Attenuation - 85 - Rin Input Impedance 18 20 - dB kΩ Rout Output Impedance - 50 100 Ω - 4.8 - Vpp - -68 -63 dB 95 100 - dB Vin=0dBV AC Characteristics Vo Maximum output voltage swing THD+N Total harmonic distortion plus noise S/N Signal-to-noise ratio (THD+N)/S < 0.1% VO=4.5Vpp Bus Characteristics VIH Bus high input level - - 0.7VDD V VIL Bus low input level 0.3VDD - - V 3.3V ELECTRICAL CHARACTERISTICS (VDD=3.3V, VSS=0V, Attenuation=0dB, Gain=0dB, f=1KHz, VO=-3dBV; unless otherwise specified) Symbol Parameter Conditions Min Typ Max Unit DC Characteristics IQ Quiescent current CS Channel separation MUTE Mute Attenuation - 2.8 3.3 mA 90 110 - dB Vin=-3dBV - 80 - dB (THD+N)/S < 0.1% - 3 - Vpp - -63 -58 dB 85 90 - dB AC Characteristics Vo Maximum output voltage swing THD+N Total harmonic distortion plus noise S/N Signal-to-noise ratio REV 1 3 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC 2.7V ELECTRICAL CHARACTERISTICS (VDD=2.7V, VSS=0V, Attenuation=0dB, Gain=0dB, f=1KHz, VO=-3dBV; unless otherwise specified) Symbol Parameter Conditions Min Typ Max Unit DC Characteristics IQ Quiescent current CS Channel separation MUTE Mute Attenuation - 2.5 2.9 mA 95 105 - dB Vin=-3dBV - 80 - dB (THD+N)/S < 0.3% - 2 - Vpp - -60 -55 dB 85 90 - dB AC Characteristics Vo Maximum output voltage swing THD+N Total harmonic distortion plus noise S/N Signal-to-noise ratio TYPICAL PERFORMANCE CHARACTERISTICS (Ta=25℃; unless otherwise specified) THD+N (%) f=20Hz THD+N (%) f=20Hz THD+N (%) f=20Hz f=20kHz f=1kHz f=1kHz VDD=5V VDD=3.3V VDD=2.7V OUTPUT VOLTAGE (dBV) OUTPUT VOLTAGE (dBV) THD+N vs. output voltage THD+N vs. output voltage VDD=2.7V VO=-3dBV VDD=5V VO=0dBV VDD=2.7V VO=-3dBV VDD=3.3V VO=-3dBV VDD=5V VO=0dBV QUIESCENT CURRENT (mA) OUTPUT VOLTAGE (dBV) CHANNEL SEPARATION (dB) THD+N (%) f=20kHz THD+N vs. output voltage VDD=3.3V VO=-3dBV REV 1 f=1kHz f=20kHz FREQUENCY (Hz) FREQUENCY (Hz) SUPPLY VOLTAGE (V) THD+N vs. frequency Channel separation vs. frequency Quiescent current vs. supply voltage 4 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC I2C BUS DESCRIPTION Start and stop conditions A start condition is activated when the SCL is set to HIGH and SDA shifts from HIGH to LOW state. The stop condition is activated when SCL is set to HIGH and SDA shifts from LOW to HIGH state. Please refer to the timing diagram below. SCL SDA Start Stop SCL : Serial Clock Line, SDA : Serial Data Line Data validity A data on the SDA line is considered valid and stable only when the SCL signal is in HIGH state. The HIGH and LOW states of the SDA line can only change when the SCL signal is LOW. Please refer to the figure below. SDA SCL Data line stable, Data valid Data change allowed Byte format Every byte transmitted to the SDA line consists of 8 bits. Each byte must be followed by an acknowledge bit. The MSB is transmitted first. Acknowledge During the Acknowledge clock pulse, the master (up) put a resistive HIGH level on the SDA line. The peripheral (audio processor) that acknowledges has to pull-down (LOW) the SDA line during the Acknowledge clock pulse so that the SDA line is in a stable LOW state during this clock pulse. Please refer to the diagram below. SCL 1 2 3 7 8 9 SDA MSB Acknowledge Start The audio processor that has been addressed has to generate an Acknowledge after receiving each byte, otherwise, the SDA line will remain at the HIGH level during the ninth (9th) clock pulse. In this case, the master transmitter can generate the STOP information in order to abort the transfer. REV 1 5 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Timing of SDA and SCL bus lines SDA tf tLOW SCL S tHD;STA tSU;DAT tr tHD;DAT Standard mode Symbol fSCL tHD;STA tf tHIGH tSU;STA Parameter Sr tSP tBUF tr tSU;STO P S Min Max Unit 0 100 kHz 4.0 - us tLOW SCL clock frequency Hold time (repeated) START condition. After this period, the first clock pulse is generated LOW period of the SCL clock 4.7 - us tHIGH HIGH period of the SCL clock 4.0 - us tSU:STA 4.7 - us 0 3.45 us tSU:DAT Set-up time for a repeated START condition Data hold time: For I2C-bus devices Data-set-up time 250 - ns tr Rise time of both SDA and SCL signals - 1000 ns tf Fall time of both SDA and SCL signals - 300 ns tSU:STO Set-up time for STOP condition 4.0 - us tBUF Bus free time between a STOP and START condition 4.7 - us Cb Capacitive load for each bus line - 400 pF VnL Noise margin at the LOW level for each connected device (including 0.1VDD hysteresis) - V VnH Noise margin at the HIGH level for each connected device (including 0.2VDD hysteresis) - V tHD:STA tHD:DAT REV 1 6 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC BUS INTERFACE Data are transmitted to and from the MCU to the MS6257 via the SDA and SCL. The SDA and SCL make up the BUS interface. It should be noted that pull-up resistors must be connected to the positive supply voltage. VDD Rp Rp Pull up resistors SDA (Serial Data Line) SCL (Serial Clock Line) MCU MS6257 Interface protocol The format consists of the following ‧A START condition ‧A chip address byte including the MS6257 address. (7bits) ‧The 8th bit of the byte must be “0”.(write=0, read=1) ‧MS6257 must always acknowledge the end of each transmitted byte. ‧A data sequence (N-bytes + Acknowledge) ‧A STOP condition SDA SCL 1-7 8 ADDRESS R / -W 9 1-7 8 9 1-7 8 9 S START CONDITION P ACK DATA ACK DATA ACK STOP CONDITION Protocol Address 1 0 0 0 1 0 7 bits address 0 0 W MS6257 address REV 1 7 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Data bytes description Function bits MSB LSB 1 1 1 1 1 1 1 1 1 1 0 1 A3 A2 A1 A0 Function description Function OFF (-79dB) 2-channel, -1dB/step 1 1 1 0 0 B2 B1 B0 2-channel, -10dB/step 1 0 1 0 A3 A2 A1 A0 Left channel, -1dB/step 1 0 1 1 0 B2 B1 B0 Left channel, -10dB/step 0 0 1 0 A3 A2 A1 A0 Right channel, -1dB/step 0 0 1 1 0 B2 B1 B0 Right channel, -10dB/step 1 1 0 0 C3 C2 C1 C0 2-channel, +1dB/step 0 1 1 0 C3 C2 C1 C0 Left channel, +1dB/step 0 1 0 1 C3 C2 C1 C0 Right channel, +1dB/step 0 1 1 1 1 0 0 M 2-channel, MUTE When M=1, MUTE=ON When M=0, MUTE=OFF Gain / Attenuation bits A3 A2 A1 A0 - B2 B1 B0 C3 C2 C1 C0 Gain / Attenuation value (dB) A B C 0 0 0 0 0 0 0 0 0 0 1 -1 -10 +1 0 0 1 0 -2 -20 +2 0 0 1 1 -3 -30 +3 0 1 0 0 -4 -40 +4 0 1 0 1 -5 -50 +5 0 1 1 0 -6 -60 +6 0 1 1 1 -7 -70 +7 1 0 0 0 -8 - +8 1 0 0 1 -9 - +9 1 0 1 0 - - +10 1 0 1 1 - - +11 1 1 0 0 - - +12 1 1 0 1 - - +13 1 1 1 0 - - +14 1 1 1 1 - - +15 1. Where Ax=-1dB/step, Bx=-10dB/step, Cx=+1dB/step REV 1 8 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Example Mute off MSB Start 1 Data byte LSB 0 0 0 1 0 0 0 ACK 0 1 1 MS6257 address 1 1 0 0 0 ACK Stop 2-ch, Mute off The initial condition is –79dB and mute on when power up. The first command must disable the mute function. Set gain of 2 channel at 0dB Start MS6257 Address ACK 1 1 1 0 0 0 0 0 ACK 1 2-ch, -10dB/step, 0dB 1 1 0 0 0 0 0 0 ACK 1 0 1 0 0 0 0 ACK 0 ACK 0 ACK 1 ACK 2-ch, -1dB/step, 0dB Stop 2-ch, +1dB/step, 0dB Set gain of 2 channel at 6dB The value of attenuation must be set zero when the volume from attenuation to gain. Start MS6257 Address ACK 1 1 1 0 0 0 0 0 ACK 1 2-ch, -10dB/step, 0dB 1 1 0 0 0 1 1 0 ACK 1 0 1 0 0 0 2-ch, -1dB/step, 0dB Stop 2-ch, +1dB/step, 6dB Set gain of 2 channel at -3dB The value of gain must be set zero when the volume from gain to attenuation. Start MS6257 Address ACK 1 1 0 0 0 0 0 0 ACK 1 2-ch, +1dB/step, 0dB 1 1 0 1 0 0 1 1 ACK 1 1 0 0 0 0 2-ch, -10dB/step, 0dB Stop 2-ch, -1dB/step, -3dB Set attenuation of left channel at –33dB Start MS6257 Address ACK 1 0 1 1 0 0 1 1 L-ch, -10dB/step, -30dB REV 1 ACK 1 0 1 0 0 0 1 Stop L-ch, -1dB/step, -3dB 9 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC APPLICATION INFORMATION Basic application example MS6257 4 SDA VDD 6 5 SCL VSS 3 1 L-IN L-OUT 2 MCU Supply 2.7~5V 0.1uF 10uF 47uF 10uF 10k Signal 10uF 8 R-IN R-OUT 7 10uF Power Amplifier 10k Basic application flow chart Procedure Of Power Up Procedure Of Power Shut Down Power up VDD = 5V Volume Control volume down to -79 dB step by step Initial Conditions function off (-79dB) mute on Enable Mute Function mute on Disable Mute Function mute off Power down VDD = 0V Volume Control volume up/down step by step 1. The initial condition is –79dB and mute on when power up. REV 1 10 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC EXTERNAL DIMENSIONS SOP8 package 8 5 Symbol H E 1 A A1 B C D H E e L 4 D Dimension in mm Min Max 1.35 1.75 0.10 0.25 0.33 0.51 0.19 0.25 4.80 5.00 5.80 6.20 3.80 4.00 1.27 BSC 0.40 1.27 Dimension in inch Min Max 0.0532 0.0688 0.0040 0.0098 0.013 0.020 0.0075 0.0098 0.1890 0.1968 0.2284 0.2440 0.1497 0.1574 0.050 BSC 0.016 0.050 L A A1 e B C TAPE AND REEL (Unit : mm) 2.0 0.30 0.05 0.05 1.5+0.1/-0.0 DIA 4.0 1.75 0.3R MAX 5.5 0.05 12.0 0.3 5.4 3.0 3.6 8.0 1.5 MIN 6.9 0.5 Radius Typical 2.0 1.7 REV 1 11 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC DEMO BOARD 4 2 1 3 Label 1: Supply Voltage The AVDD and DVDD should be the same supply voltage, the supply range is 2.7~5.5 VDC. Label 2: Control Switch 2-CH+ : The volume-up switch for stereo channel The volume increase by +1dB as the switch is pressed once, the maximum value is up to +15dB. The default value is 0dB on initial status. L-channel and R-channel are active synchronic. 2-CH- : The volume-down switch for stereo channel The volume decrease by -1dB as the switch is pressed once, the minimum value is up to -79dB. L-channel and R-channel are active synchronic. MUTE : Press the switch once to enter mute on or mute off. The default status is mute off on initial status. RESET : Reset MCU controller, the system will be loaded default value. Label 3: Input section Please input stereo audio signal, as music or sine wave. Label 4: Output section Please connected to a post-power-amplifier, as stereo speaker. REV 1 12 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Circuit DVCC RESET 10K C3 C16 10u R1 10K + 9 8 7 6 5 4 3 2 1 C17 + 104 10u U2 01 02 03 04 20 VCC C1 1 RST/VPP 05 06 07 09 0A 0B 0D 0E 0F 08 11 9 8 7 6 3 2 P3.7 P3.5/T1 P3.4/T0 P3.3/INT1 P3.2/INT0 P3.1/TXD P3.0/RXD 20p 4 5 XTAL2 XTAL1 C2 19 18 17 16 15 14 13 12 P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1/AIN1 P1.0/AIN0 20p AT89C2051 R2 10K RCA9 R-IN1 R6 + C4 RCA10 R-OUT R13 + R5 100K RCA2 L-IN1 C5 C12 + RCA1 L-OUT R3 10K R14 C13 + 10u AVDD U1 1 2 3 4 REV 1 + C18 104 C15 10u L-IN1 R-IN1 L-OUT R-OUT VSS VDD SDA SCL 8 7 6 5 MS6257 13 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC DEMO BOARD 2 1 4 1 3 Label 1: Supply Voltage The AVDD and DVDD should be the same supply voltage, the supply range is 2.7~5.5 VDC. Label 2: Control Switch 2-CH+ : The volume-up switch for stereo channel The volume increase by +1dB as the switch is pressed once, the maximum value is up to +15dB. The default value is 0dB on initial status. L-channel and R-channel are active synchronic. 2-CH- : The volume-down switch for stereo channel The volume decrease by -1dB as the switch is pressed once, the minimum value is up to -79dB. L-channel and R-channel are active synchronic. LCH+ : The volume-up switch for left channel The volume increase by +1dB as the switch is pressed once, the maximum value is up to +15dB. LCH- : The volume-down switch for left channel The volume decrease by -1dB as the switch is pressed once, the minimum value is up to -79dB. RCH+ : The volume-up switch for right channel The volume increase by +1dB as the switch is pressed once, the maximum value is up to +15dB. RCH- : The volume-down switch for right channel The volume decrease by -1dB as the switch is pressed once, the minimum value is up to -79dB. MUTE : Press the switch once to enter mute on or mute off. The default status is mute off on initial status. RESET : Reset MCU controller, the system will be loaded default value. REV 1 14 www.mosanalog.com MOSA MS6257 GAIN AND ATTENUATION VOLUME CONTROLLER IC Label 3: Input section Please input stereo audio signal, as music or sine wave. Label 4: Output section Please connected to a post-power-amplifier, as stereo speaker. Circuit 2 1 DVCC C13 +C15 104 10u RESET S9 R12 103 10uF R11 10k C18 U2 + C17 1 2 3 4 5 6 7 8 9 10 12M 20pF C16 20pF RST P3.0 P3.1 XTAL2 XTAL1 P3.2 P3.3 P3.4 P3.5 GND 20 19 18 17 16 15 14 13 12 11 Vcc P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0 P3.7 AT89C2051 2CH+ LCH+ S3 OPEN : 88H SHORT: 8CH 2CH- S8 LCH- S2 J3 AO J1 AVDD RCH+ S6 RCH- S5 MUTE CH-SEL S4 2 1 2 1 S1 S7 104 10u C12 + C14 U1 1 2 3 4 5 6 7 8 A.O. CAP L-IN4 R-IN4 L-IN3 R-IN3 L-IN2 R-IN2 L-IN1 R-IN1 L-OUT R-OUT VSS VDD SDA SCL 16 15 14 13 12 11 10 9 + 10u C11 MS6258 + 10u 100K R1 C1 + C2 + C3 + C4 R2 R3 R4 R5 LIN4 RCA1 LIN3 RCA2 LIN2 RCA3 LIN1 RCA4 + + C5 + C6 + C7 R6 + C8 R7 + C9 C10 R9 R8 R10 L1 REV 1 LOUT RCA5 ROUT RCA6 15 RIN1 RCA7 RIN2 RCA8 RIN3 RCA9 RIN4 RCA10 www.mosanalog.com