acknowledgement question

Discussion in 'General Electronics Chat' started by bug13, Jun 29, 2015.

  1. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi guys

    I have a question regarding acknowledgement (ACK) between two devices. So my question is: How to tell the ACK is received?

    Say I have a Master and a Slave, they need to communicate. That's what would I am planing to do:
    Master: send a stream of message with CRC.
    Slave: received message and replay with ACK.

    So how can the slave tells the master has received the ACK? I can't get the master to reply with another ACK, because if I do, they will go on forever. So how do we handle a situation like this?

    Thanks guys!!
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,793
    829
    Are you there?
    I'm here and got your question!
    Here's my message for you.
    I'm here and got your message!
    I'm done...
    I understand

    From the sender's point of view, for each transmission it requires a response (ACK). Sometimes, it takes a few times to "synchronize the communications"... If the sender receives an "I don't understand" (NAK), it retries its last operation.

    Are you there?
    I don't understand
    Are you there?

    I don't understand
    Are you there?

    I don't understand
    Are you there?
    I'm here and got your question!
    Here's my message for you.
    I'm here and got your message!
    I'm done...
    I understand

    There are several protocols for communications. That was taken from a description of serial communications and generalized from TCP/IP handshaking. XON/XOFF protocol is similar as well.
     
    bug13 likes this.
  3. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    In general:
    1. The receipt of a NAK causes re-transmission.
    2. The lack of an ACK causes re-transmission after a timeout interval.
    3. The receipt of an ACK allows the transmission of the next packet.
     
    bug13 likes this.
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,793
    829
    Missed point 2! Thanks for adding it, Papabravo.
     
Loading...