AN93

APPENDIX C—PARALLEL/SPI INTERFACE SOFTWARE IMPLEMENTATION

This appendix describes the software interface requirements for communication with the ISOmodem in parallel or SPI mode. Sample code was developed to run on the Silicon Labs C8051F12xx platform to allow basic communication between the modem and a PC using the parallel or SPI interface. Figure 74 shows a typical connection between a PC and the modem using the MCU C8051F12xx demo board as interface:

Figure 74. PC to Modem Connection through a C8051F12xx Demo Board

A typical application is structured in four software layers:

1.Hardware access: where the MCU performs all the basic I/O accesses to and from the modem

2.Interrupt service or polling: depending on the mode of access (polling or interrupt), this layer contains the algorithms that determine when the host and the modem exchange data.

3.Data buffer management, status and control: this portion of the code contains the circular buffers that relay data between the UART and the modem in both directions. Access functions are provided for the application to set the software interrupt mask and the escape bit, and to query the status of software interrupts.

4.The application layer: this code depends on the application. An example application main() block is provided in this document. An optional diagnostic console-level command set is also available to run on the application layer. This command set is enabled using compiler options in the MCU development environment. Refer to "Compiler Option: Dot Commands" on page 299 for details.

290

Rev. 1.3

Page 290
Image 290
Silicon Laboratories SI2493/57/34/15/04, SI2494/39 manual Appendix C-PARALLEL/SPI Interface Software Implementation