Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 125 - Toucpad robotics C11
P. 125

    Data Framing: Data is transmitted in packets called “frames.” Each frame typically includes:
                     u
                        ∑	 A start bit (signals the beginning of data).
                        ∑	 Data bits (usually 5 to 9 bits, representing the actual data).
                        ∑	 An optional parity bit (for basic error checking).
                        ∑	 One or more stop bits (signals the end of data).
                     Uses in Robotics

                        Microcontroller to PC Communication: Often used for debugging, sending log data from a robot’s microcontroller
                     u
                        to a computer’s serial port.
                        Interfacing with Modules: Connecting microcontrollers to various modules like Global Positioning System (GPS)
                     u
                        receivers, Bluetooth modules, Wi-Fi modules, or Radio Frequency Identification (RFID) readers.
                        Simple Sensor Communication: For sensors that only need to send data periodically and don’t require high speed
                     u
                        or complex networking.

                     Speed and Performance
                        Lower Speed: Generally the slowest among the protocols discussed here. Typical maximum baud rates range from
                     u
                        9600 bits per second up to around 1 Megabit per second (Mbps).
                        Limitations: Speed is limited by the accuracy of the internal clocks of the communicating devices. A significant
                     u
                        difference in baud rate can lead to corrupted data.
                     Error Detection and Reliability
                        Basic  Error  Detection: Can include  an optional  parity  bit for simple  error  checking.  The parity  bit  indicates
                     u
                        whether the number of ‘1’ bits in the data frame is even or odd. If the receiver calculates a different parity, it knows
                        an error occurred.
                        No Automatic Retransmission: UART itself does not have mechanisms for automatic error correction or retransmission
                     u
                        of corrupted data. This must be handled by higher-level software.
                        Reliability: Generally reliable for short-distance, low-speed communication between two devices.
                     u
                     Inter-Integrated Circuit (I2C)
                     Description
                     Inter-Integrated Circuit, often pronounced “I-squared-C” or “I-two-C,” is a synchronous, multi-master, multi-slave serial
                     communication protocol developed by Philips (now NXP Semiconductors). “Synchronous” means it uses a shared clock
                     line for synchronization.

                     Key Characteristics and Differences
                        Synchronous: Uses a common clock signal for synchronization.
                     u
                        Two Wires: Requires only two bidirectional wires:
                     u
                        ∑  Serial Data Line (SDA): For transmitting and receiving data.
                        ∑  Serial Clock Line (SCL): For providing the clock signal.
                        Multi-Master,  Multi-Slave: Allows multiple  “master”  devices  (which control  the  communication)  and multiple
                     u
                        “slave” devices (which respond to commands) to share the same two bus lines.
                        Addressing: Each slave device on the I2C bus has a unique 7-bit (or sometimes 10-bit) address. The master addresses
                     u
                        a specific slave by sending its address, allowing it to communicate with individual devices on the shared bus.
                        Acknowledgement  (ACK)  Mechanism: After each  byte  of data  is transferred, the  receiving  device  sends  an
                     u
                        acknowledgement signal, confirming successful receipt. This improves reliability.
                        Pull-up Resistors: Requires external pull-up resistors on both the Serial Data Line and Serial Clock Line wires to
                     u
                        function correctly.

                                                                                                                           123
                                                                                                     Electrical and Control Systems

| 120 121 122 123 124 125 126 127 128 129 130 |