This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051 Serial port

Does anyone know how to cancel the transmission just after a write to SBUF ?

Parents
  • -how to "abort byte in progress".
    -how to minimize the delay between write to SBUF and the start bit on tx.

    1) you can't (of course a couple of gates between Tx and the transciever could do it). However I have done J1708 for 500+ units/month for years with no problems and never done this.
    2) If there is one, what derivative do you use, mine have no delay beyond a few us

    Erik

Reply
  • -how to "abort byte in progress".
    -how to minimize the delay between write to SBUF and the start bit on tx.

    1) you can't (of course a couple of gates between Tx and the transciever could do it). However I have done J1708 for 500+ units/month for years with no problems and never done this.
    2) If there is one, what derivative do you use, mine have no delay beyond a few us

    Erik

Children
  • -how to "abort byte in progress".

    -how to minimize the delay between write to SBUF and the start bit on tx.

    1) That cannot be done on a std 8051. A power off, reset or TR1 = 0; would maybe do something like that and debugging would not be a funny task at all.

    2) Create your own 8051. ( faster XTAL? )


    Alex

  • a "funny" (rather sad) story about J1708 and the pseudorandom "int rand(void);"

    The J1708 specification specify that after a collision a random delay is to be invoked before the transmission is attempted.

    Two devices, both using the Keil "int rand(void);" collided and since the random delay was the same for the two every time they just kept colliding.

    WARNING:
    When doing J1708 do not rely on pseudorandom use a true random. I have a free running timer that save the value at the end of each transmission from the individual device and this seems to work.

    Erik