SPI (Serial Peripheral Interface) and Localbus intercommunication method and application thereof

The invention discloses an SPI and Localbus intercommunication method for achieving communication between an SPI of a processor and a Localbus of a chip. A CPLD (Complex Programmable Logic Device) is used for connecting the SPI of the processor and the Localbus, the SPI of the processor serves as a host mode, the SPI of the CPLD serves as a slave mode, and a 50 MHz active crystal oscillator externally-connected with the CPLD serves as a synchronous clock; different processing is performed on SPI data of the processor and the Localbus according to CS (Chip Selection) signal of the SPI of the CPLD in the intercommunication method. The SPI and Localbus intercommunication method is applied to network voice exchange devices. According to the SPI and Localbus intercommunication method, due to the facts that CPLD is connected between the SPI of the processor and the Localbus of the chip and read-write operatipn of the Localbus is completely converted to the SPI of the CPLD and the SPI of the processor, connection between the chip and the processor is simplified to the largest extent, connection reliability is improved, development difficulties are reduced and system costs are greatly reduced.