Custom Serial Protocol | Cypress Semiconductor
Custom Serial Protocol
I've been looking into trying to use the PSOC 5LP in an application requiring a customized serial protocol and wonder what the best way to go about it might be. The basic idea is that I have several sensors that use SPI to communicate. The PSOC would need to be able to grab data from these sensors, pack it into a "frame", prepend a synchronization word, add a few other housekeeping words, and then push it out as a set of serial bits at a rate of roughly 5Mb/s. Does this sound feasible using say the CY8C5888LTI-LP097? If so, what would be the most likely path to success? I've been playing with the shift register block, but have been struggling to get it working correctly.
It seems there are two hurdles to overcome with this: 1) Grabbing the data from each of the separate SPI ports and packing the data into (maybe a ping pong or circular?) buffer. 2) Generating a structure with low enough latency to push out 5Mb/s consistently from one frame to the next.
As a follow up question, I was curious about how many separate SPI ports could be instantiated before the PSOC started complaining .... turns out the number for this device is apparently 8. If anyone has any insight into talking to more than 3 or 4 SPI slave devices at once, I'd be interested to learn about it.