9 Replies Latest reply on Apr 26, 2016 3:29 AM by user_246598725

    Bridge Control Panel API?

    jakob.wenzel_1593196

      Hi there,

         

       

         

      I am using a CY8CKIT-043. Using Bridge Control Panel, I can communicate with the Target Chip. Is there driver support for doing the same from my own program running on the PC? 

         

      I tried using the "USB-Serial Software Development Kit", but that only seems to support dedicated USB Bridge Chips, not KitProg. Any help would be appreciated.

         

       

         

      Regards,

         

      Jakob

        • 1. Re: Bridge Control Panel API?
          user_1377889

          It could be easier when you use the COM-port emulation an access at the PC side your PSoC via RS232. For testing use a terminal emulation program as PuTTY and use for UART connection pin P7_0 and P7_1.

             

           

             

          Bob

          • 2. Re: Bridge Control Panel API?
            jakob.wenzel_1593196
                    I was hoping you could point me to some easy to use library, but yeah, that seems like the way to go.   
            • 3. Re: Bridge Control Panel API?
              user_246598725

              Hi Jakob,

                 

               

                 

              "running your own program on PC" misses one relevant information: which programming language is used? For example, the .NET framework supports COM ports out of the box.

                 

              Or did I missinterpret your question?

                 

               

                 

              Regards,

                 

               

                 

              Ralf

              • 4. Re: Bridge Control Panel API?
                user_302397898

                Take a look at the example project in PSoC Creator "Start Page" tab >> Examples and kits >> Find Code Example >> UART_RX and UART_TX. Download the entire project and run it. The instructions on wiring your breadboard on on the top level design. You can use an open source free terminal program on you PC such as Terraterm or PuTTY.  I use a USB-to-TTL Serial (TTL-232) cable to connect my development board to the PC's USB port. Be sure to pay attention to logic level (3.3 or 5V). As always, the Rx line from your USB connects to the Tx line on your board and vice versa.
                Get the example program to run first, then you can copy it into your own design.

                • 5. Re: Bridge Control Panel API?
                  jakob.wenzel_1593196

                  Hi Ralf,

                     

                   

                     

                  my goal is to set and read configuration/status values in the microcontroller. I2C is built for exactly this purpose. UART has no inherent start and stop signals, which makes separating multi-byte-messages harder, especially if  I want to be able to recover from conditions like partial messages (e.g. if the program on the PC crashes for some reason). I2C therefore seemed easier to use software wise.

                     

                   

                     

                  However, there seems to be no software API for any programming language to access the USB to I2C functionality in the CY8CKIT-043, the COM Port emulation only seems to map to the UART interface. If that indeed is the case, using UART is the only option.

                     

                  I did not yet decide on a programming language to use on the PC.

                     

                   

                     

                  Regards,
                  Jakob

                  • 6. Re: Bridge Control Panel API?
                    user_1377889

                    However, there seems to be no software API for any programming language to access the USB to I2C functionality in the CY8CKIT-043

                       

                    No, there is none, of course not.

                       

                    The connection to the PC that you use is UART and when you want to talk to your Cypress kit you may use that interface. Most programming languages offer a USB library.

                       

                    You are using an interface that is not connected to your PSoC, it is connected to the Kitprog programmer which is designed for programming the PSoC chip and as an aside there are two bridges implemented that convert signals from the PSoC to USB.

                       

                    I2C is more dangerous than UART. When I2C was defined there was no timeout defined. So still there can be the problem of a non-responding I2C interface. UART can be made more save by terminating messages with special bytes as newline. And if you want you may send a start byte.

                       

                     

                       

                    Bob

                    • 7. Re: Bridge Control Panel API?
                      jakob.wenzel_1593196
                          

                      No, there is none, of course not.

                         
                         

                      That answers my initial question, thank you.

                         

                      However, I am wondering why only one of the two bridges implemented in the Kitprog is exposed to user software. 

                         

                       

                         

                      Regards,

                         

                      Jakob

                      • 8. Re: Bridge Control Panel API?
                        user_302397898

                        @jakob, I found this article in the Cypress Knowledge Base: "Replacing FT232R with CY7C65213 USB-UART LP Bridge Controller – KBA85921"
                        If that doesn't help, perhaps you could clarify your question with specifics. Best wishes.
                        Jerry

                        • 9. Re: Bridge Control Panel API?
                          user_246598725

                          Hi Jakob,

                             
                              

                          However, I am wondering why only one of the two bridges implemented in the Kitprog is exposed to user software. 

                             
                             

                          It's because UART is much easier to use. UART uses a byte-oriented protocol, that means that each byte is independant from the others regarding their meaning. I2C, for example, is a packet-oriented protocol. There's an address byte for the chip itself, then a n-byte address value for the register which should be accessed, transfers must be acknowledged, start/stop conditions must be selectable etc...

                             

                          So, the problem is simple: if they would expose the interface, all customers would ask to implement a function which transfers data according to their used I2C devices.

                             

                           

                             

                          However, what about this idea: the Kitprog usually supports custom firmware, so maybe you can route the COM port to I2C by using an interpreter.

                             

                          Alternatively, why don't create a support ticket and ask for this bridge API? If you decide to ask, please keep us updated.

                             

                           

                             

                          Regards,

                             

                           

                             

                          Ralf