1 Reply Latest reply on Apr 16, 2018 7:55 AM by e.pratt_1639216

    SPI to TCP/IP with PSoC4


      Hi Everyone

      I need to let my PSoC4 CY8CKIT-049 kit communicate with PC through Ethernet. I have an SPI to Ethernet Converter Module based on ENC28J60. I am planning to make a customized PSoC Creator component named "TCP" for this project. I have just started up by creating a project in PSoC Creator (Please find herewith the attachment.). Would anyone like to share his/her experiences by giving some code snippets, documents (Mainly to understand TCP/IP, SPI and their interconnectivity) and module projects?


      Thanks in advance.


      Shaunak Agastya Vyas


        • 1. Re: SPI to TCP/IP with PSoC4

          Some tips for SPI protocols: Make sure to have a way to clear the buffer/data if invalid data is received (either a timer to clear received data, or a start/stop sequence to signal new messages). You will also need a way to send the default bus value (0x00 or 0xFF depending on your default logic level). An escape character to signal that the next default bus value is valid is the approach I took, and was used in ASCII as well.

          For implementing TCP, take a look at the 7-layer OSI architecture, as it helps lay out and define each layer of the connection with its functionality: TCP/IP vs. OSI: What’s the Difference Between them?

          Make sure to build in error handling for communications on the TCP/IP stack as well.