Re: Аудиопроцессор R2S15902FP

but the input audio was not dividing how to solve that sir

Re: Аудиопроцессор R2S15902FP

final doubt sir can write seprate options for inputs like aux,dvd,fm etc..

53

Re: Аудиопроцессор R2S15902FP

final doubt sir can write seprate options for inputs like aux,dvd,fm etc..

Названия входов выводить на экран?

Re: Аудиопроцессор R2S15902FP

AUX, USB, DTH, DVD

55

Re: Аудиопроцессор R2S15902FP

Переключение входов происходит? Проблем нет?

Re: Аудиопроцессор R2S15902FP

no sir the input switching is not working

57

Re: Аудиопроцессор R2S15902FP

попробуйте этот скетч -

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <R2S15902FP.h>
#include <Encoder.h>
#include <EEPROM.h>
#include <MsTimer2.h>
#include <boarddefs.h>
#include <IRremote.h>
  LiquidCrystal_I2C lcd(0x27,16,2);  // Устанавливаем дисплей
  IRrecv irrecv(12); // указываем вывод модуля IR приемника
  Encoder myEnc(9, 8);// DT, CLK
  decode_results ir; 
 byte a1[8] = {0b00000,0b10101,0b10101,0b10101,0b10101,0b10101,0b10101,0b00000};
 byte a2[8] = {0b00000,0b10100,0b10100,0b10100,0b10100,0b10100,0b10100,0b00000};
 byte a3[8] = {0b00000,0b10000,0b10000,0b10000,0b10000,0b10000,0b10000,0b00000};  
 unsigned long time,oldPosition  = -999,newPosition;    
 int menu,vol,vol_d,treb,treb_d,bass,bass_d,in; 
 byte w,w2,z,z0,z1,r_l; 
      
void setup(){ irrecv.enableIRIn(); // запускаем модуль IR
  lcd.init();lcd.backlight();// Включаем подсветку дисплея
  lcd.setCursor(0,0);lcd.print("   R2S15902FP   ");delay(2000);
  Serial.begin(9600); lcd.createChar(0,a1);lcd.createChar(1,a2);lcd.createChar(2,a3);
  pinMode(DATA, OUTPUT); // D2
  pinMode(CLK, OUTPUT);   // D3
  pinMode(10,INPUT);// МЕНЮ КНОПКА SW энкодера
   MsTimer2::set(3, to_Timer);MsTimer2::start(); // АКТИВИРУЕМ ПРЕРЫВАНИЯ ДЛЯ ЭНКОДЕРА
   vol = EEPROM.read(0);treb = EEPROM.read(1);bass = EEPROM.read(2);in = EEPROM.read(3);
  delay(100);cl();
  audio();
}

void loop(){
   if(digitalRead(10)==LOW){menu++;cl();time=millis();w=1;w2=1;if(menu>3){menu=0;}}// меню
   
   if(menu==0){
   
   if (newPosition != oldPosition){oldPosition = newPosition;
     vol=vol+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;w2=1;vol_func();audio();} 
     lcd.setCursor(0,0);lcd.print("VOLUME  ");
     lcd.print(" ");lcd.print(-vol);lcd.print(" ");lcd.setCursor(13,0);lcd.print("dB");vol_d=48-vol;
   if(w2==1){
   for(z=0,z0=0,z1=0;z<=vol_d;z++,z1++){if(z1>2){z1=0;z0++;}
   if(z1==1){lcd.setCursor(z0,1);lcd.write((uint8_t)0);lcd.setCursor(z0+1,1);lcd.print("   ");}}
   if(z1==3){lcd.setCursor(z0,1);lcd.write((uint8_t)1);}
   if(z1==2){lcd.setCursor(z0,1);lcd.write((uint8_t)2);}w2=0;}}

///////////////////////// TREBLE +/-14 dB /////////////////////////////////////////////////////////
   if(menu==1){
    
     if (newPosition != oldPosition) {
    oldPosition = newPosition;
    treb=treb+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;w2=1;treb_func();audio();} 
   lcd.setCursor(0,0);lcd.print("TREBLE  ");
   lcd.print(" ");lcd.print(14-treb*2);lcd.print(" ");lcd.setCursor(13,0);lcd.print("dB");treb_d=28-treb*2;
   if(w2==1){
   for(z=0,z0=0,z1=0;z<=treb_d;z++,z1++){if(z1>2){z1=0;z0++;}
   if(z1==1){lcd.setCursor(z0+3,1);lcd.write((uint8_t)0);lcd.setCursor(z0+1+3,1);lcd.print("   ");}}
   if(z1==3){lcd.setCursor(z0+3,1);lcd.write((uint8_t)1);}
   if(z1==2){lcd.setCursor(z0+3,1);lcd.write((uint8_t)2);}w2=0;}}
   
///////////////////////// BASS +/-14 dB /////////////////////////////////////////////////////////
   if(menu==2){
    
     if (newPosition != oldPosition) {
    oldPosition = newPosition;
    bass=bass+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;w2=1;bass_func();audio();} 
   lcd.setCursor(0,0);lcd.print("BASS    ");
   lcd.print(" ");lcd.print(14-bass*2);lcd.print(" ");lcd.setCursor(13,0);lcd.print("dB");bass_d=28-bass*2;
   if(w2==1){
   for(z=0,z0=0,z1=0;z<=bass_d;z++,z1++){if(z1>2){z1=0;z0++;}
   if(z1==1){lcd.setCursor(z0+3,1);lcd.write((uint8_t)0);lcd.setCursor(z0+1+3,1);lcd.print("   ");}}
   if(z1==3){lcd.setCursor(z0+3,1);lcd.write((uint8_t)1);}
   if(z1==2){lcd.setCursor(z0+3,1);lcd.write((uint8_t)2);}w2=0;}}  

///////////////////// IN /////////////////////////////////////////////////////////////////////////  
   if(menu==3){  
    if (newPosition != oldPosition) {
    oldPosition = newPosition;
    in=in-newPosition;myEnc.write(0);newPosition=0;time=millis();cl();w=1;w2=1;in_func(); if(in==3){r_l=1;}else{r_l=0;}audio();} 
   lcd.setCursor(0,0);lcd.print("INPUT  ");lcd.print(in+1);
  
   }
  
   if(millis()-time>10000 && w==1){
     EEPROM.update(0,vol);EEPROM.update(1,treb);EEPROM.update(2,bass);EEPROM.update(3,in);
     menu=0;w=0;w2=1;cl();} 
}
void in_func(){if(in>3){in=0;}if(in<0){in=3;}}
void bass_func(){if(bass>14){bass=14;}if(bass<0){bass=0;}}
void treb_func(){if(treb>14){treb=14;}if(treb<0){treb=0;}}
void vol_func(){if(vol<0){vol=0;}if(vol>99){vol=99;}}
void cl(){ir.value=0;delay(300);lcd.clear();}
void to_Timer(){newPosition = myEnc.read()/4;}
void audio(){
  Slot1(in,0,r_l,0,bass,treb,0); 
    // input selector  1...4 === int 0...3, in4 === multi in
    //REC-Output Gain Control int 0...6 dB === int 0...3
    //L/R Input 0 === IN1...3, 1 === IN4 MULTI
    //ADC Input ATT 0...-6 dB === int 0...3
    //bass int 0 === +14dB int 8 === 0dB int 15 === -14dB
    //treble int 0 === +14dB int 8 === 0dB int 15 === -14dB
    //Input Gain 0...14 dB === int 0...7
  Slot2(0,vol,0,vol); // gain0, volume0, gain1, volume1
  Slot3(0,vol,0,vol); // gain2, volume2, gain3, volume3
  Slot4(0,vol,0,vol); // gain4, volume4, gain5, volume5
  // gain 0...14 dB === int 0...7
  // volume 0...-99 dB === int 0...100
}

Re: Аудиопроцессор R2S15902FP

ok...sir can you suggest best 5.1 audio processor like mid bass treble--5.1 audio

59

Re: Аудиопроцессор R2S15902FP

http://rcl-radio.ru/?p=62504

Re: Аудиопроцессор R2S15902FP

any other audio procesors like

61

Re: Аудиопроцессор R2S15902FP

У меня на сайте больше нет проектов которые имеют вход 5.1.
Возможно есть другие варианты, но мне они не известны.

62

Re: Аудиопроцессор R2S15902FP

У меня на сайте больше нет проектов которые имеют вход 5.1.
Возможно есть другие варианты, но мне они не известны.

Re: Аудиопроцессор R2S15902FP

sir we want best 5.1 awsome quality sir...if you tell best quality of 5.1 audio we will assemble that

Re: Аудиопроцессор R2S15902FP

sorry for asking so many times sir..is there programming ic mid bass treble or best quality

65

Re: Аудиопроцессор R2S15902FP

Посмотрите качественные аудиопроцессоры на странице https://www.rohm.com/products/audio-vid … tricSearch

Re: Аудиопроцессор R2S15902FP

thank you sir .....in r2s15902fp input dividing issue that is the input is changing in audio processor but when i changed my input the sound is not coming..i want left and right audio for input 1 and input 2

Re: Аудиопроцессор R2S15902FP

but sir all inpus are not working in that processor

Re: Аудиопроцессор R2S15902FP

but sir only input 1 is working...how to solve all inputs are can be work

69

Re: Аудиопроцессор R2S15902FP

Опубликуйте Ваш скетч.

Re: Аудиопроцессор R2S15902FP

http://forum.rcl-radio.ru/viewtopic.php?pid=6183#p6183

71

Re: Аудиопроцессор R2S15902FP

Работает только вход 1?

Re: Аудиопроцессор R2S15902FP

yes in that code only 1input is working and dividing other 3 inputs are not working can you divide 4 inputs like AUX,USB,BLUETOOTH,FM

73

Re: Аудиопроцессор R2S15902FP

Замените все содержимое файла R2S15902FP.h библиотеки на:

#include "R2S15902FP.h"

const boolean input[4][3]={{0,1,0},{1,0,0},{1,1,0},{0,0,1}}; //  Input Selector 
const boolean rec_out[4][2]={{0,0},{0,1},{1,0},{1,1}}; //  REC-Output Gain Control  
const boolean input_att[4][2]={{0,0},{0,1},{1,0},{1,1}};//ADC Input ATT 

const boolean bass_data[15][4]={{1,1,1,1},{1,1,1,0},{1,1,0,1},{1,1,0,0},{1,0,1,1},{1,0,1,0},{1,0,0,1},{1,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{0,1,0,0},{0,1,0,1},{0,1,1,0},{0,1,1,1}}; // bass
const boolean treb_data[15][4]={{1,1,1,1},{1,1,1,0},{1,1,0,1},{1,1,0,0},{1,0,1,1},{1,0,1,0},{1,0,0,1},{1,0,0,0},{0,0,0,1},{0,0,1,0},{0,0,1,1},{0,1,0,0},{0,1,0,1},{0,1,1,0},{0,1,1,1}}; // treble
const boolean input_gain_data[8][3]={{0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}};//Input Gain 
const boolean input_control_data[8][3] ={{0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}};//Gain Control  
const boolean volume[100][7]  ={{0,0,0,0,0,0,0},{0,0,0,0,0,0,1},{0,0,0,0,0,1,0},{0,0,0,0,0,1,1},{0,0,0,0,1,0,0},{0,0,0,0,1,0,1},{0,0,0,0,1,1,0},{0,0,0,0,1,1,1},{0,0,0,1,0,0,0},{0,0,0,1,0,0,1},{0,0,0,1,0,1,0},{0,0,0,1,0,1,1},{0,0,0,1,1,0,0},{0,0,0,1,1,0,1},{0,0,0,1,1,1,0},{0,0,0,1,1,1,1},{0,0,1,0,0,0,0},{0,0,1,0,0,0,1},{0,0,1,0,0,1,0},{0,0,1,0,0,1,1},{0,0,1,0,1,0,0},{0,0,1,0,1,0,1},{0,0,1,0,1,1,0},{0,0,1,0,1,1,1},{0,0,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1,0,0},{1,0,1,1,1,0,1},{1,0,1,1,1,1,0},{1,0,1,1,1,1,1},{1,1,0,0,0,0,0},{1,1,0,0,0,0,1},{1,1,0,0,0,1,0},{1,1,0,0,0,1,1}}; // volume


void Slot1(int in, int out_gain, int att, bool R_L_in, int bass, int treb, int in_gain){
  // input selector  ||  0-2 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input[in][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
  //  REC Output  ||  3 bit
    digitalWrite(DATA, HIGH); // 1 4in
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
  //  REC-Output Gain Control  ||  4-5 bit
  for(int i=0;i<2;i++){
    digitalWrite(DATA, rec_out[out_gain][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
  //  ADC Input ATT  ||  6-7 bit
 for(int i=0;i<2;i++){
    digitalWrite(DATA, input_att[att][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
  //   L/R Input   || 8 bit
    digitalWrite(DATA, R_L_in); // 0 ... 1
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
  // BASS  ||   9 - 12 bit
  for(int i=0;i<4;i++){
    digitalWrite(DATA, bass_data[bass][i]); 
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
  // TREBLE   ||  13 - 16 bit
  for(int i=0;i<4;i++){
    digitalWrite(DATA, treb_data[treb][i]); 
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
  //   SL/ SR/ C/ SW Input  || 17 bit 

    digitalWrite(DATA, R_L_in); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
   // Input Gain  ||  18 - 20 bit
   for(int i=0;i<3;i++){
    digitalWrite(DATA, input_gain_data[in_gain][i]); 
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
    // 21 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 22 bit 
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 23 bit  
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, HIGH);// CLOCK
    digitalWrite(CLK, LOW);
    digitalWrite(DATA, LOW);
}

void Slot2(int gain0, int vol0, int gain1, int vol1){
 // Gain Control 0  ||  0-2 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain0][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 0  ||  3 - 9 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol0][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // Gain Control 1  ||  10-12 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain1][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 1  ||  13 - 19 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol1][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
    //  20 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    //  21 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 22 bit 
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 23 bit 
    digitalWrite(DATA, HIGH); // 1
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, HIGH); // CLOCK
    digitalWrite(CLK, LOW);
    digitalWrite(DATA, LOW);
}

void Slot3(int gain2, int vol2, int gain3, int vol3){
 // Gain Control 2  ||  0-2 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain2][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 2  ||  3 - 9 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol2][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // Gain Control 3  ||  10-12 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain3][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 3  ||  13 - 19 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol3][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
    // 20 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    //  21 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 22 bit LOW
    digitalWrite(DATA, HIGH); // 1
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 23 bit  HIGH
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, HIGH); // CLOCK
    digitalWrite(CLK, LOW);
    digitalWrite(DATA, LOW);
}

void Slot4(int gain4, int vol4, int gain5, int vol5){
 // Gain Control 4  ||  0-2 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain4][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 4  ||  3 - 9 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol4][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // Gain Control 5  ||  10-12 bit
  for(int i=0;i<3;i++){
    digitalWrite(DATA, input_control_data[gain5][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
 // volume 5  ||  13 - 19 bit
  for(int i=0;i<7;i++){
    digitalWrite(DATA, volume[vol5][i]);
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);}
    // 20 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    //  21 bit
    digitalWrite(DATA, LOW); // 0
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 22 bit LOW
    digitalWrite(DATA, HIGH); // 1
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, LOW);
    digitalWrite(CLK, LOW);
    // 23 bit  HIGH
    digitalWrite(DATA, HIGH); // 1
    digitalWrite(CLK, HIGH);
    digitalWrite(DATA, HIGH); // CLOCK
    digitalWrite(CLK, LOW);
    digitalWrite(DATA, LOW);
}

Re: Аудиопроцессор R2S15902FP

https://youtu.be/x_hC-_QBKO0 sir in that can you design like that i have that board yesterday i bought it from market evening i like that lcd characters can we design our sketch like that...,?

Re: Аудиопроцессор R2S15902FP

is it possible sir..waiting for your reply?