Method for pulse coding Communication Using PC serial port

Source: Internet
Author: User
The method proposed in this paper can be used to evaluate the one-wire (one-Bus) device for Pulse Width coding communication through PC serial port, and monitor communication errors, such as parity and response. The hardware interface with the PC is the maxcompute driver/receiver, and the following device in this example is the TMP141 Temperature Sensor of Texas Instrument. Using four programmable addresses (see Figure 1) of TMP141 determined by A0 and A1, this circuit can be extended into four sensors on the same bus.

The main illustration of this method uses the built-in time of RS-232 baud rate control. Most communications require three "bit encodings": (start bit), data (bit 0), and data (bit 1) (see table and figure 2 ). Use mscomm of Visual Basic to configure the PC comport to output 8 data bits without parity, 1 Stop bits, and no traffic control. The data bit setting and baud rate of the comport determine the bit width. Different pulse width codes are obtained by changing the baud rate between BITs.

Programming the PC comport baud rate will produce a latency of 20 to 30 ms, because the slave device does not have a timeout event, so this delay is not a problem. However, latency may complicate the read output on the logical analyzer. The Visual Basic program controls two-way communication to the TMP141 sensor. The program can read and program internal registers.

Author: Ed Rojas, Email: rojas_ed@ti.com, Texas Instruments

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.