Description
ECPSR086370-001 External Crystal Oscillator
ECPSR086370-001 uses an external crystal oscillator to provide the clock input to access the CAN controller SJA1000 through parallel address/data multiplexing, and pin P2.0 is used as the chip select port; SJA1000, as the CAN controller, also uses a separate external clock input, and due to the integration of the physical layer and data link layer functions of the CAN protocol, it can complete the communication data frame processing, its address is 0x00 ~ 0xFF; TJA1050 as the interface between the CAN controller and the physical bus, using high-speed operating mode, used to provide the bus differential transmission capability and CAN controller differential reception capability; MAX202E is used to achieve the RS232 level to the microcontroller interface circuit of the TTL level conversion.
The software design of the ECPSR086370-001 module mainly consists of two parts: the RS232 communication procedure and the CAN communication procedure, using interrupt mode. Among them, the baud rate of RS232 communication data transmission is 115 200 bit/s, and the data format is 1 bit start bit, 8 bit data bit, and 1 bit stop bit; the transmission baud rate of CAN bus is 500 kbit/s, and it adopts the standard data frame format of PeliCAN mode, and the identifier ID of each message is 11 bits, and the valid data is 0 to 8 bytes.
ECPSR086370-001 In the RS232 interrupt procedure, the microprocessor processes the received serial data and extracts the data bytes, generates the CAN message format by adding frame structure information, frame type, byte length and identifier, etc., and then sends it out from the CAN controller’s transmit buffer; in the CAN interrupt procedure, the microprocessor parses the received valid CAN messages, extracts the byte length and identifier ID, etc.; in the CAN interrupt procedure, the microprocessor In the CAN interrupt procedure, the microprocessor parses the received valid CAN message, extracts the byte length and byte content, and converts it to RS232 communication format by adding the data header, data tail and checksum to complete the data transmission.