We have a C Sharp example project for programming a PSoC5 device. Please find the example at this path: "C:\Program Files (x86)\Cypress\Programmer\Examples\Programming\PSoC3_5\SWD\C_Sharp"
Note that you need PSoC Programmer software installed to be able to view this path. If you don't have it already, then you can download it from here: https://www.cypress.com/products/psoc-programming-solutions
Can you be more specific about what you what the PC host to do?
For example, in the past I created a C# program that opens a COM port to provide UART-style communication between the PSoC and the PC. I then parse the incoming Rx PSoC communication data. As needed, I command the PSoC via the Tx to change modes and the such.
How you connect this psoc program with visual studio and how you read the psoc data in visual studio?
Please help me to provide the steps and sample application which will help me a lot.
In my understanding, a PC application and a firmware are very different species.
A PC application is built using a tool such as Visual Studio and runs on an OS such as Windows.
On the other hand a firmware is built using a tool such as PSoC Creator and runs without an OS or on a Real Time OS.
We could arrange both programs to communicate via interface(s) exist on both hardware (PC and PSoC Board),
such as UART, USB, ..
But from the last response in the discussion below,
I have a feeling that what Abinash-san wants to do is
Building both PSoC firmware and PC application with visual studio, especially in C#.
So I think that the question is if we can generate PSoC firmware using visual studio and C#?
Considering that Cypress is not supporting even C++ with PSoC Creator,
expecting C# to generate PSoC Native binary and program/debug from visual studio may not be the easiest thing to do.
May be possible, if Visual Studio allows to use a GNU tool chain and if the GNU tool chain contains C# and a cross compiler for Cortex-M3 (or for PSoC 5LP).
Any suggestion(s) and/or opinions?
You can use VSCODE with Modus Toolbox2.1, but is there any good way?
Below is my requirement.
We are planing to do a PH Meter project where the sensor read PH value from the water and send to Micro-controller. Wanted to read that data from my Window application and display.
1.Can you please suggest how can i achieve it?
2.Will PH Sensor send value to microcontroller automatically or we need to write any firmware for that?
Thanks and Regards,
Usually connection would look like
(1) Connect the sensor to the PSoC EVB via the interface which the sensor supports.
(2) PSoC's firmware reads (and may be, calculate) the sensor value and output it to the interface connected to the PC
(3) PC reads the data from PSoC and displays it (in your way.)
This case unless there is/are ready made sample code for the sensor and the PSoC board,
most likely you need to write a program (firmware) to do that.
Note: There are many sample code in the community code example area
Then you need to send data from the PSoC board to PC.
IMHO, probably the easiest way is using UART and UART_PutString() or printf type functions.
Finally, PC's application needs to read the data from the COM port and display it "in your way".
Again, the easiest would be using a serial terminal program such as Tera Term to display the numbers.
Or using SerialPlot to show it as a graph of lines.
The following USL is my sample of using CCS811 air sensor and displayed the data as number or graph.
Or you can write as fancy program as you like with your windows development environment.
Can you send a c# sample application where you implemented UART-style communication and parseing the incoming Rx PSoC communication data?
Can you please help me to tell the steps you follow to do this?
For my dev kit(CY8CKIT-050 PSOC 5LP ) any kitprog USB-UART driver required?
For the CY8CKIT-050 PSOC 5LP if you are using the USBFS_UART component with the board's J2 connector to connect to the PC, you will need the USBUART_cdc.inf during the driver install phase.
It should be on your system when you installed either the PSoC Creator or PSoC Programmer. However, I attached it here just in case.
Once successfully installed AND you have your CY8CKIT-050 programmed with code to use the USBFS_UART AND you connect your kit to the PC with the appropriate USB cable, you should see a new COM port in the Device Manager.
Here is a another reference discussion link:
USBUART_cdc.inf.zip 1.1 K
Please refer to my response at the discussion below.
P.S. Yes, In case you use USBFS-UART component the inf file Len-san attached is required.
if the intention is to really have the PSoC application written in C#, you might want to look at the nanoFramework project:
However, there's currently no PSoC ported version available. And because of the PSoC device nature you'll need extensive support from Cypress as well if you want to port it.