Shama, A., Lashin, M., Nada, A. (2024). A State Machine-Based Approach for Implementing SPI Communication on FPGAs. Benha Journal of Applied Sciences, 9(5), 127-134. doi: 10.21608/bjas.2024.280338.1384
Ayman Shama; Manar Lashin; Ayman Nada. "A State Machine-Based Approach for Implementing SPI Communication on FPGAs". Benha Journal of Applied Sciences, 9, 5, 2024, 127-134. doi: 10.21608/bjas.2024.280338.1384
Shama, A., Lashin, M., Nada, A. (2024). 'A State Machine-Based Approach for Implementing SPI Communication on FPGAs', Benha Journal of Applied Sciences, 9(5), pp. 127-134. doi: 10.21608/bjas.2024.280338.1384
Shama, A., Lashin, M., Nada, A. A State Machine-Based Approach for Implementing SPI Communication on FPGAs. Benha Journal of Applied Sciences, 2024; 9(5): 127-134. doi: 10.21608/bjas.2024.280338.1384
A State Machine-Based Approach for Implementing SPI Communication on FPGAs
1Department of Mechanical Engineering, Benha Faculty of engineering, Benha University, Benha, Egypt
2Department of Electrical Engineering, Benha Faculty of Engineering, Benha University, Benha, Egypt
3Department of Mechatronics and Robotics Engineering, Egypt-Japan University of Science and Technology, Alexandria, Egypt
Abstract
The Serial Peripheral Interface (SPI) is a widely used synchronous serial communication bus that facilitates communication between a master device, and one or more subordinate devices, referred to as slave devices. This article outlines the conceptualization and design procedures of an interface for the SPI communication bus on a Field Programmable Gate Array (FPGA) platform, using the LabVIEW programming environment alongside the LabVIEW FPGA module. The structure and operation of the SPI communication bus are presented, along with its timing structure and four distinct operational modes. The implementation of SPI bus communication on the FPGA is achieved via the use of the state machine methodology. With the state-machine SPI technique, multiple devices can be managed simultaneously through a single port. Additionally, the clock frequency can be adjusted online, making the system adaptable and flexible for different tasks. LabVIEW is used to implement the SPI module circuit, which is then mapped onto the National Instruments Single-Board (NI SbRIO-9631) FPGA board. The L3G4200D gyroscope sensor is used to conduct testing on the protocol and verify the effectiveness of the state machine technique. The results of this study demonstrate the successful implementation of the SPI communication bus interface on an FPGA using LabVIEW and the LabVIEW FPGA module. The module exhibits versatility, efficiency, and the ability to communicate with a wide range of devices.