5 Replies Latest reply on Dec 6, 2015 3:00 AM by JoMe_264151

    USB 2.0 to SPI bridge with manchester encoding

      Hello,

         

      I hope i am right here with my posted topic. What i found so far in this forum told me that my following project should be feasible.

         

      In short:

         

      I get some data from a device which only can provide it on an USB 2.0 communication channel. But i need this data to be at the end of the system in an unidirectional stream which additionally will be manchester encoded before putting it into a transmitter unit. 

         

      Host USB 2.0 <-> USB 2.0 PSoC3/5 ->SPI -> XOR gate -> manchester encoded data

         

      Is it possible to combine these interfaces in the pictured order? Of course the USB driver of my USB host and the PSoC should match. In combination with AN2281 and AN2358 for manchester encoding and decoding the SPI output, i should be able to get the desired communication. The received data rate from the host is about 2-5Mbit/s.

         

      Thanks in advance for any helpful advice.

         

       

         

      Stell

        • 1. Re: USB 2.0 to SPI bridge with manchester encoding
          JoMe_264151

          Welcome in the forum, Stell.

             

          I would suggest you to use a PSoC5 design (more modern CPU than PSoC3), a prototyping kit is available, have a look at it here.

             

          The PSoC internal hardware (xor) will easily run with up to 48MHz, all needed components are available.

             

          So, when you download and install Creator you can start immediaterly.

             

           

             

          Bob

          • 2. Re: USB 2.0 to SPI bridge with manchester encoding

            Hi Bob,

               

            thanks for your comment. So you think that it is actually doable to design such a system with the given interfaces?

               

            One more thing before i begin. Are there any exceptions to USB Device Classes which can be implemented?

               

             

               

            Stell

            • 3. Re: USB 2.0 to SPI bridge with manchester encoding
              JoMe_264151

              The implementation of USB in PSoC is nothing exotic. If you already know about USB descriptors (as opposed to me) you'll be fine off.

                 

              I would suggest you to download and install Creator 3.3 from the Cypress website, and following some of the USB-releated videos or AppNotes program your USB interface. There are examples, look at those. You may even install beforehand your (hopefully already ordered) kit and start designing...

                 

               

                 

              Bob

              1 of 1 people found this helpful
              • 4. Re: USB 2.0 to SPI bridge with manchester encoding

                Hey Bob,

                   

                thank you so far. I went through this and noticed that the encoding should work pretty well but does it also offer a constant output?

                   

                Now i got my data received from the USB interface and they are ready to be sent over SPI and being encoded. Does this process go seamlessly from array to array, as described in AN2281, with a constant output as soon as it started ones? Or are there small delays expected because of the periodic function request?

                   

                Regards,

                   

                Stell

                • 5. Re: USB 2.0 to SPI bridge with manchester encoding
                  JoMe_264151

                  When using DMA for transferring the data between two peripherals there will be only a minimal delay in the order of a few µs. A similar request using CPU-transfer (also known as "poor man's DMA") will be a bit slower, but "burns" lots of MIPs. Setting up DMA could be a pain in the a.., but when it works once, you are done ;-)

                     

                   

                     

                  Bob

                  1 of 1 people found this helpful