<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[forum.rcl-radio.ru &mdash; M65857FP - MITSUBISHI SOUND PROCESSOR ICs]]></title>
		<link>http://forum.rcl-radio.ru/viewtopic.php?id=144</link>
		<atom:link href="http://forum.rcl-radio.ru/extern.php?action=feed&amp;tid=144&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «M65857FP - MITSUBISHI SOUND PROCESSOR ICs».]]></description>
		<lastBuildDate>Sat, 14 Mar 2020 06:33:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[M65857FP - MITSUBISHI SOUND PROCESSOR ICs]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=1142#p1142</link>
			<description><![CDATA[<p>Разработка на стадии тестирования</p><p>The M65857FP is a Surround Processor IC for AV Amplifier ,Mini-component stereo and Car audio built-in QSurround™5.1.<br />The QSurround™5.1 system generates 5.1ch from 2ch input and produce 3D sound. <br />(Note) QSurround™5.1 is a trademark of QSound Labs, Inc., and is used under license from QSound Labs, Inc.</p><p><span class="attention-yellow"></span> </p><p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2020/03/6a8515738619a6a2f268f0119285572f.png" alt="http://forum.rcl-radio.ru/uploads/images/2020/03/6a8515738619a6a2f268f0119285572f.png" /></span> </p><p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2020/03/ddc9c3fdac422ee01ceff8b5f1fb2738.png" alt="http://forum.rcl-radio.ru/uploads/images/2020/03/ddc9c3fdac422ee01ceff8b5f1fb2738.png" /></span> </p><p>Библиотека - <span class="attention-yellow"></span> </p><p>test.ino</p><div class="codebox"><pre><code>#include &lt;M65857FP.h&gt;

M65857FP sur(2,3,4); // DATA, CLOCK, LATCH

void setup(){
   audio();
}

void loop(){}

void audio(){
  sur.setReg(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
          // 1  2  3  4  5  6  7  8  9  10
  // 1 - MODE bool 0...1 === By_pass...QSurround_5.1
  // 2 - INPUT bool 0...1 === Mono...Stereo
  // 3 - CENTER bool 0...1 === OFF...ON
  // 4 - Surround output bool 0...1 === OFF...ON
  // 5 - Surround effeсt bool 0...1 === Narrow...Wide
  // 6 - Delay time byte 0...3 === 20 30 40 50 (ms)
  // 7 - Delay LPF bool 0...1 === 3...7 (kHz)
  // 8 - Delay effect bool 0...1 === OFF...ON
  // 9 - Delay gain bute 0...2 === 1 2 3 4 (gain low...high)
  // 10 - Delay feed back gain byte 0...4 === -3 -6 -9 -12 ∞ (dB)
  }</code></pre></div><p>M65857FP.h</p><div class="codebox"><pre><code>//  M65857FP MITSUBISHI SOUND PROCESSOR ICs
//  Alexander Liman
//  liman324@yandex.ru
//  rcl-radio.ru

#ifndef  M65857FP_H
#define  M65857FP_H

#include &lt;Arduino.h&gt;


class  M65857FP
  {
    public:

  M65857FP(uint8_t, uint8_t, uint8_t);
  void setReg(bool mode_b, bool in_b, bool center_b, bool sur_out_b, bool surr_ef_b, byte del_time_b, bool del_lpf_b, bool del_ef_b, bool del_gain_b, byte del_feed_gain_b);
  
    private:

  uint8_t DATA;
  uint8_t CLOCK;
  uint8_t LATCH;

  };
#endif</code></pre></div><p>M65857FP.cpp</p><div class="codebox"><pre><code>#include &lt;M65857FP.h&gt;

  byte del_time[4][2] = {{0,0},{1,0},{0,1},{1,1}}; // 0...3 | 20 30 40 50 ms
  byte del_gain[4][2] = {{0,0},{1,0},{0,1},{1,1}}; // 0...3 | 1 2 3 4 
  byte del_feed_gain[5][3] = {{0,0,0},{1,0,0},{0,1,0},{1,1,0},{1,1,1}}; // 0...4 | -3 -6 -9 -12 &amp;&amp; dB

M65857FP::M65857FP(uint8_t data, uint8_t clock, uint8_t latch){
          DATA = data;
          CLOCK = clock;
          LATCH = latch;
      pinMode(DATA,OUTPUT);
      pinMode(CLOCK,OUTPUT);
      pinMode(LATCH,OUTPUT);
}

void M65857FP::setReg(bool mode_b, bool in_b, bool center_b, bool sur_out_b, bool surr_ef_b, byte del_time_b, bool del_lpf_b, bool del_ef_b, bool del_gain_b, byte del_feed_gain_b){
     // CLOCK
     digitalWrite(LATCH,HIGH);
     delay(2);
     digitalWrite(LATCH,LOW);
     
     // 1 - MODE
     digitalWrite(DATA, mode_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 2- INPUT
     digitalWrite(DATA, in_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 3 - CENTER
     digitalWrite(DATA, center_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 4 - SURROUND OUTPUT
     digitalWrite(DATA, sur_out_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 5 - SURROUND EFFECT
     digitalWrite(DATA, surr_ef_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 6 - DELAY TIME
 for(int i=0;i&lt;2;i++){
     digitalWrite(DATA, del_time_b[del_time][i]);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);}

     // 7 - DELAY LPF
     digitalWrite(DATA, del_lpf_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 8 - DELAY EFFECT
     digitalWrite(DATA, del_ef_b);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);

     // 9 - DELAY GAIN
 for(int i=0;i&lt;2;i++){
     digitalWrite(DATA, del_gain_b[del_gain][i]);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);}

     // 10 - DELAY FEED BACK GAIN
 for(int i=0;i&lt;3;i++){
     digitalWrite(DATA, del_feed_gain_b[del_feed_gain][i]);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);}
     
     // DE 1
     digitalWrite(DATA, HIGH);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(1);
     // DF 0
     digitalWrite(DATA, LOW);delay(1);
     digitalWrite(CLOCK, HIGH);delay(2);
     digitalWrite(CLOCK, LOW);delay(2);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Sat, 14 Mar 2020 06:33:36 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=1142#p1142</guid>
		</item>
	</channel>
</rss>
