Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to connect RX 1 000 of SJA1and RX2?
How to connect RX 1 000 of SJA1and RX2?
TX0/TX 1 and RX0/RX 1 of SJA 1000 are designed to be directly connected to CAN bus CANH/CANL without using external drivers. At this time, TX0 and RX0 are shorted, and TX 1 and RX 1 are connected to CANH and CANL respectively. It should be noted that the TP/TN field effect transistor of SJA 1000 internal transmitter driver does not know whether there is an overcurrent protection circuit. For reliability, it is best to connect the power supply to the VDD2/VDD3 pins through a current limiting resistor. (or use current-limiting power supply 100MA). VDD2/VSS2V corresponds to the power supply of TX0 transmitter driver, and DD3/VSS3 corresponds to the power supply of TX 1 transmitter driver. VDD 1/VSS 1 is the chip power supply.

Obviously, we usually use an external CAN bus driver 82C250 or something. Its input TX and output RX are unipolar. At this time, the TX0/TX 1 or RX0/RX 1 pins of SJA 1000 should be the same, but because the internal circuit design of TX 1 and RX 1 endows other functions, only TX0 and RX0 are used to connect the 82C250 driver. Let's get down to business:

RX0 and RX 1 are two inputs of SJA 1000 internal differential receiving comparator A, which are connected to CANH and CANL when no external bus driver is used. Now, RX 1 is a unipolar input of RX0, so RX 1 should be connected to the midpoint of the CAN level (comparator level), that is, 2.5V. This is why bus drivers generally provide a reference voltage of 2.5V. At this time, it should be noted that the CBP bit in the CDR register must be set to "0".

An electronic switch B attached to the differential comparator A in the CBP bit control chip is connected to the input of the comparator A(-) like a single-pole double-throw switch, and the input of the comparator A(+) is connected to RX0. ) one throw is connected with RX 1, and the other throw is connected with the output end of the comparator; Thus, by switching the electronic switch B, the differential comparator A is either a comparator or a follower. When CBP = 1, it is a follower (shaping circuit). The RX 1 pin is suspended at this moment, and it doesn't matter where it is connected or not. Because it is introduced into the chip, floating may introduce noise, so the manual suggests connecting RX 1 to a fixed level, which may be vdd/VSS/2.5v. In addition, the follower reduces the delay of the comparator, which is why CBP = 1 in the manual can reduce the signal delay and relax the bus distance.

Conclusion: If electronic circuits (such as operational amplifier, comparator, follower, N/P channel field effect transistor, etc. ), as long as the RX 1 pin of SJA 1000 is connected to the reference voltage output terminal Vref of bus driver 82C250, the communication can proceed normally regardless of the CBP bit setting of 1/0.

This only explains in principle why some books have RX 1 grounded, while others have Vref.

The electronic switch B can be connected to the input of the next stage of the comparator A, and then one throw is connected to the output of the comparator A and the other throw is connected to the input of RX0. When CBP=0, the switch is connected to the output of A to turn off RX0.

When CBP = 1, the switch is connected to RX0, and the output of A is disconnected, which really spans the delay of comparator A. (At this time, it doesn't matter what RX 1 is connected to).

The follower's narrative seems to be lax. But here's the principle.