This project implements error detection and correction using the Hamming Code algorithm in Embedded C to ensure reliable data transmission over UART. The system is further enhanced by integrating a PS/2 Keyboard for real-time user input and interfacing transmitter and receiver modules using the I2C communication protocol.
Key features include:
- Hamming Code Implementation: Encoding on the transmitter (Tx) side and decoding with error correction on the receiver (Rx) side.
- UART Communication: Reliable data transmission between components.
- PS/2 Keyboard Integration: Seamless real-time input from the user.
- I2C Protocol: Effective communication between the transmitter and receiver.
- Error Detection and Correction: Developed and implemented Hamming Code to detect and correct single-bit errors during data transmission.
- PS/2 Keyboard Interfacing: Enabled real-time data entry for the system using a PS/2 keyboard.
- Reliable Communication: Ensured robust data transfer by combining UART and I2C protocols.
-
PS/2 Keyboard Input:
- The keyboard is interfaced with the microcontroller to provide real-time data input.
- Data from the keyboard is processed and prepared for transmission.
-
Data Transmission:
- Data is encoded using Hamming Code on the transmitter side to add error detection and correction capabilities.
- Encoded data is sent over I2C communication protocol to the receiver.
-
Data Reception:
- The receiver decodes the Hamming-encoded data, identifies errors (if any), and corrects them.
- Decoded data is output for further use.
- Language: Embedded C
- Communication Protocols: UART and I2C
- Microcontroller Integration: PS/2 keyboard interfacing and communication between Tx and Rx
- Error Handling: Hamming Code for robust error management
- Clone this repository:
git clone https://github.com/xeomatrix/Data-error-detect-and-correct.git
- Open the project files in your preferred Embedded C IDE (e.g.,arduino ide Keil, MPLAB, or STM32CubeIDE).
- Compile and upload the code to your microcontroller using ardhino frame work.
- Connect the PS/2 keyboard and verify the UART and I2C communication setup.
- Run the system and monitor the output for error detection and correction in real-time.
├── src
│ ├── Reciver
| | ├── Reciver.c
| | └── hamming_decode.h
│ ├── Transmitter
| | ├── Tx.c
| | └── hamming_encode.h
│ ├── Ps2final
| | ├── Reciver.c
| | └── hamming_encode.h
- Extend support for multi-bit error detection and correction.
- Add support for additional input devices.
- Enhance error correction algorithms for faster performance.
This project is licensed under the MIT License.
For any queries or contributions, feel free to contact:
- Name: Mohammed Hamza
- Email: [email protected]
Thank you for exploring this project! Contributions are welcome.