Method for simulating LIN bus host to send LIN data packet
A data packet and bus technology, applied in bus network, data exchange network, electrical digital data processing, etc., can solve the problem that RS232 serial port does not support LIN bus, etc., and achieve the effect of improving the level of intelligence
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0016] The present invention will be further described in conjunction with the accompanying drawings and specific embodiments.
[0017] Such as figure 1 Shown, a kind of method of simulating LIN bus master to send LIN data packet, wherein, described method comprises the following steps:
[0018] S1. Initialize the RS232 serial port of the MCU, and set its baud rate to the first baud rate, which is lower than the working baud rate of the LIN bus. Preferably, the first baud rate is equal to half of the working baud rate of the LIN bus. For example, if the working baud rate of the LIN bus is 19200bps, the first baud rate may be set to 9600bps. Suppose the time for each bit of the first baud rate is t1, and the time for each bit of the working baud rate of the LIN bus is t2, then t1=2*t2.
[0019] S2. Send a byte of data 0 (low level). Like this, will produce the low level time of 9*t1 under the first baud rate, will be the low level time of 9*(2*t2)=18*t2 for the working baud...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 
