icsc Majenko library problem

I have problem
i am create test project in proteus

Algorithm:
master send to slave command and led is high
slave recieve command wait and 15times try send to master command for led is LOW

master react only on 5
why ?

Master:

#include <ICSC.h>
const int buttonPin = 3;
const int ledPin = 4;
const int portreadyled = 5;
const int dePin = 2;
int buttonState = 0;
ICSC icsc(Serial,'A',dePin);

void setup() {
// put your setup code here, to run once:
// initialize the button pin as a input:
pinMode(buttonPin, INPUT);
// initialize the LED as an output:
pinMode(ledPin, OUTPUT);
pinMode(2,OUTPUT);
Serial.begin(9600);
icsc.begin();
icsc.registerCommand('G',&check);
delay(2000);
digitalWrite(ledPin, HIGH);
delay(100);
icsc.send('B', 'S');

}

void loop() {
icsc.process();
}
void check(unsigned char src, char command, unsigned char len, char *data)
{
digitalWrite(ledPin, LOW);

}

Slave:

 #include <ICSC.h>
#include <String.h>
const int buttonPin = 3;
const int ledPin = 4;
const int dePin = 2;
int buttonState = 0;

ICSC icsc(Serial,'B',dePin);
void setup() {
// put your setup code here, to run once:
// initialize the button pin as a input:
pinMode(buttonPin, INPUT);
// initialize the LED as an output:
pinMode(ledPin, OUTPUT);
pinMode(2,OUTPUT);
Serial.begin(9600);
icsc.begin();
icsc.registerCommand('S',&stat);
}
void loop() {

icsc.process();

//icsc.send('A', 'G');
}
void stat(unsigned char src, char command, unsigned char len, char *data)
{

delay(1000);
for (int i=0; i <= 15; i++){
icsc.send('A', 'G');
icsc.process();
delay(50);
}

}

You forgot the link to that ICSC library.

master react only on 5

What does that mean? How do you check the reaction? You can see only the reaction on the first successful command as it pulls the LED low. All following commands are not shown.

What do you expect?

sorry my english not good/ :frowning:
link to library https://github.com/MajenkoLibraries/ICSC

What does that mean? How do you check the reaction?

skip first 4 times command .If i change delay between sending command it may skip first 10 times ? 20 times etc.

skip first 4 times command .If i change delay between sending command it may skip first 10 times ? 20 times etc.

How do you check that? You're sending the same command 15 times. How do you detect on which one it reacts?

Proteus terminal. I look when Led is off and how much comman it recieve in terminal/
And simply test change iterations in for loop

for (int i=0; i < 2; i++){
icsc.send('A', 'G');
icsc.process();
delay(50);

For example, if i do only 2 iterations, the master does not do anything

It's probably because the ICSC protocol has a checksum and detects wrong transfers. As your hardware setup is missing relevant parts I guess the bytes aren't transfered correctly and many messages are thrown away for that reason.

Your setup is missing the pullup for the RO line, you have only one terminating resistor and you have no resistors to define the bus state if no driver is active.

i am change shematic

atachment screens:

1: not work
2: work good

Usually you have only R3/R6 or R4/R7 but not both. I’m still missing the termination resistor (usually about 120Ω) on both ends. I guess you had problems in the first version with the termination resistors because you had the idle state fixation on both ends. Believe me, for longer bus lengths you definitely need the termination, otherwise you get reflections which you cannot distinguish from the normal traffic.

Thx Pylon for help , i place terminator over 10k ohm and work good (just for proteus) . In hardware i will use standart 100 or 120 ohm terminator .