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

CAN: some questions about how T89C51CC01 does it

Maybe some1 can help with next questions:

- are dominant bits produced with zeros? For example, if CANIDTx register contain 11110000 so does CAN transmit r-r-r-r-d-d-d-d bits (r=recessive, d=dominant)? Here we connect CAN RX/TX directly to 82С250 chip.

- which order of transmitted bits? Is it next: bit 7 of CANIDT1 ... bit 0 of CANIDT1 ... bit 3 of CANIDT4 (with service bits inside, ofcoz)?

- is it necessary to set CANIDMx registers for transmit message objects? Why?

- does CAN controller of T89C51CC01 retransmit frames if it detects BERR (Bit error)? And AERR (Acknowledgement error)? Or does it set corresponded bit only and it is my task to retransmit it again?

- What is difference between General Errors (bits of CANGIT register) and Message Object Errors (bits of CANSTCH register)?

- does CANIT bit work only if CAN interrupts are allowed by set ECAN set?

Thanks you, I have even more questions next time (=
Good days!

  • You really should consult the data sheet of that chip, not this newsgroup, for this kind of details.

    And the CAN protocol standard, too, for some of them.

  • About manual: I did. If you try download and read Atmel manual abouf T89C51CC01 then you wll be surprised about that there are no answers on these questions there. Then I ask Atmel Tech Support but there is no answer yet. So I asked here; maybe someone is already familary with CAN and helps.

    As about Bosch CAN specification - well , it is really interested document (be sure, I have read it many times). But! It says that physical implementation is not subject of standard.

    Anyway, thanks. I'll wait till something from Atmel if so. Sorry.

  • You dont necessarily need to know all the ins/outs of the physical side of the CAN bus. The most important features that you probably need to know are:

    1) uC is always connected to the CAN bus via a CAN transiever IC.

    2) CAN messages transmitted to the CAN bus from one node are acknowledged by one/more other nodes connected to the same bus. If the message is not acknowledged then the transmitting node retries upto 255 times at which point in goes into a bus off state (stops RX/TX).

    3) Errors on the bus are automatically detected by the CAN controller and again transmitting node tries upto 255 times before giving up.

    I have successfully used the CC01 within several CAN nodes and have found it to be very reliable with CAN comms. and reasonably simple to use.

    Rob.

  • Thank you, Rob!

    Your answer helps about re-transmission. Actually, it should be not 255 times but 16 only (128 / 8).

    As about other. The reason why programmer should know about how it works physical is the original Bosch CAN specification which says about Data Frame:

    "IDENTIFIER. <skip> The 7 most significant bits must not be all recessive". This rule was discarded late by ISO 11898. But who knows which device may be connected to? So for following the standard you should know:
    - the order which bits are transmitted with;
    - either 0 or 1 does produce recessive bits.
    Otherwise there is a chance to break rules of specification. Anyway, I have already solved this problem, so all is okay.

    Good days!