RS232 (ย่อมาจาก: Recommended Standard no. 232) คือมาตรฐานการสื่อสารข้อมูลดิจิตอลแบบอนุกรม (serial communication) ซึ่งถูกกำหนดขึ้นครั้งแรกในปี ค.ศ. 1960 โดย EIA (Electronic Industries Association) หรือ สมาคมอุตสาหกรรมอิเล็กทรอนิกส์ของอเมริกา ซึ่งในยุคแรก RS232 เป็นที่นิยมมากขนาดที่คอมพิวเตอร์ทุกเครื่องจะต้องมี Serial port สำหรับการสื่อสารมาตรฐานนี้และเชื่อว่าคอมพิวเตอร์ของผู้ใช้หลายๆท่านก็ยังมี Port เชื่อมต่อนี้อยู่ แต่ในปัจจุบันได้มี USB ซึ่งเป็นมาตรฐานสื่อสารที่รับ/ส่งข้อมูลได้เร็วกว่าเข้ามาแทนที่ ทำให้มาตรฐานการสื่อสารอย่าง RS232 ก็ค่อยๆมีอุปกรณ์ที่รองรับน้อยลงเรื่อยๆตามการเวลา

หลักการทำงานของ RS232


มาตรฐาน RS232 เป็นมาตรฐานที่รับ/ส่งข้อมูลแบบ Full duplex หรือจะให้พูดง่ายๆคือสามารถรับและส่งข้อมูลได้พร้อมกันทั้งคู่ในเวลาเดียวกัน โดยการรับ/ส่งข้อมูลนั้นจะใช้สายไฟทั้งหมด 3 เส้น ได้แก่

  • Tx (Transmit data) คือ สายส่งข้อมูล ซึ่งสายเส้นนี้จะมีหน้าที่ในการส่งข้อมูลเท่านั้น
  • Rx (Receive data) คือ สายรับข้อมูล ซึ่งสายเส้นนี้จะมีหน้าที่ในการรับข้อมูลเท่านั้น
  • GND (Signal ground) คือ สายกราวด์ เป็นสายเทียบหรืออ้างอิงแรงดันไฟฟ้า 0V

RS-232 การเชื่อมต่อ

Read More

Reference pinout diagrams for DB9 connector (sometimes known as DE9 connector or D-sub connector) for RS232 serial communication ports. RS232 is a serial data communication signalling protocol. D-sub 9pins or 25pins connector is commonly use for RS232. These days RJ45 (or 8P8C) modular connector is also commonly used for RS232 purpose.

Note:
For 3 wires RS232 serial communication (non-hardware-handshaking or asynchronous data communication) wiring, you only need pin 2, 3 (RX, TX) and pin 5 (Gnd)

Typically the TX pin of a RS232 D-sub connector represent data flowing out of the connector, flowing into the RX pin of its mating connector. This is a communication channel between two devices.

Read More