Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Trying to create a bridge between application and programmer device.

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Trying to create a bridge between application and programmer device.
Moderator:
RKRM

Post Reply
Follow this topic



Trying to create a bridge between application and programmer device.

Shawn Bowne posted on 18 Oct 2010 11:36 AM PST
Member
2 Forum Posts

 Hi, I'm trying to use the ActiveX control in C# to create the bridge between the app and programmer. I imported the control and pasted this code in from the document: http://www.cypress.com/?docID=22268


It's giving me a warning about the namespace "USB2IICcom_EXEClass" and saying it cannot be found. Any ideas on why this won't work?



using System;


using System.Collections.Generic;


using System.ComponentModel;


using System.Data;


using System.Drawing;


using System.Linq;


using System.Text;


using System.Windows.Forms;


using System.Diagnostics;


using USB2IIC;


 


namespace WindowsFormsApplication1


{


    public partial class Form1 : Form


    {


        USB2IICcom_EXEClass Bridge;


        public Form1()


        {


            InitializeComponent();


        }


        private void buttonConnect_Click(object sender, EventArgs e)


        {


            if (Bridge != null) return; // Bridge is already connected


            // Create Bridge Instance


            Bridge = new USB2IICcom_EXEClass();


            // Connect Events


            Bridge.BridgeConnected = OnBridgeConnect;


            Bridge.BridgeDisconnected = OnBridgeDisconnect;


            // Start USB Communication


            Bridge.InitUSB2IIC(Process.GetCurrentProcess().Id);


        }


        private void buttonDisconnect_Click(object sender, EventArgs e)


        {


            Bridge = null;


            GC.GetTotalMemory(true);


        }


        private void OnBridgeConnect(string BridgeID, string str)


        {


            MessageBox.Show("Connected: " BridgeID);


        }


        private void OnBridgeDisconnect(string BridgeID)


        {


            MessageBox.Show("Disconnected: " BridgeID);


        }


    }


}


 


 




Re: Trying to create a bridge between application and programmer device.

Shawn Bowne posted on 20 Oct 2010 07:07 AM PST
Member
2 Forum Posts

 I got a version of this to run using the files on this page: http://www.cypress.com/?id=3&rtID=5&rID=47&fileID=265&cache=0&CFID=43384&CFTOKEN=43181305#

I tried the Visual Basic example and the C# example. Each one allows a connection, but no devices show up. I have the programmer plugged into the USB port on my computer and the status light shows green. Any ideas on what could be the problem?






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20