You are here

USB communications on PSoC 3 & 5 | Cypress Semiconductor

USB communications on PSoC 3 & 5

Summary: 10 Replies, Latest post by Bob Marlowe on 09 Oct 2013 07:38 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
pnielsen3's picture
User
132 posts

I have been able to communicate via RS232 and I2C very well. How ever I am confused how to pass data to and from the PSoC 3 & 5. I used paremeters for the RS232 communications. I not sure how to pass data from the analog section to the PC. Any snippets of code would be very helpful.

Thanks

 

Philip

 

U2
uday's picture
Cypress Employee
569 posts

Hi Philip, from your comment what I understand is, you want to transfer information about analog signals to PC. If this is the case the simplest method to do this would be,

  • Sample the analog signal and digitise the same using an ADC.
  • The digitised information could be transported in to a PC via UART or USB.

I have attached a project that achieves the above mentioned implementation using UART. It digitises an anlog channel using ADC and puts out the same on UART. You can view the output information using any hyperterminal program on the PC.

It is also possible to transport data to PC via Miniprog3 or USB-I2C bridge. When you use Miniprog3, it acts as a USB-I2C bridge. Data from PSoC goes in to the bridge via I2C and from the bridge it goes in to the PC via USB. You can refer to the following App note to use USB-I2C bridge.

http://www.cypress.com/?rID=38725

 

U2
uday's picture
Cypress Employee
569 posts

In the example project attached, UART is used to communicate with HyperTerminal. UART is configured in 8-bit, full-duplex mode with a baud rate of 9600 bps. This project demonstrates the usage of UART Rx interrupts. In the project, the ADC data is sent to the HyperTerminal if the key ‘s’ is pressed. If some other key is pressed, the data stored in UART_writeBuffer is sent to the UART HyperTerminal.

pnielsen3's picture
User
132 posts

Thanks for the link. I have the PSoC 3 and PSoC 5. They have USB ports for programming and comunications. I was going to use the USB communications port for transfer of data. However I need to look over your link very carefully.

 

Thank You,

 

Philip

U2
uday's picture
Cypress Employee
569 posts

The following links will help you if you are looking for a quick start on USB in PSoC3/PSoC5.

USB Interrupt Transfer Example - PSoC® 3 / PSoC 5 

CE60246 - USBUART in PSoC® 3 / PSoC 5 

Frankee's picture
User
4 posts

Normal
0

21

false
false
false

HU
X-NONE
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Normál táblázat";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}

The application note USB Interrupt Transfer Example is being updated at the moment. Could you give me any information about the aim of this update?

I am newbie in the development of PSoC. I developed my own application which is using an USB Interrupt Transfer based on this application note. However, I would like to upgrade my application from Win XP to Win 7 platform.  But, I am afraid I will not be able to accomplish it by using the PSoCFirstTouchUSBNetLib.dll. Since, this dll is written for WinXP.

So, now I am thinking to move to CyUSB.dll. However, I have not found any simple USB interrupt transfer example for this dll. Is there any chace, that the new version of the USB Interrupt Transfer Example application note will work under Win 7?

 

Thanks.

U2
uday's picture
Cypress Employee
569 posts

Currently the USB interupt transfer Example is being updated to incorporate changes, one of them is to upgrade it upgrade the C# GUI to use CyUSB.dll. Whether the C# GUI provided uses the PSoCFirstTouchUSBNetLib.dll or CyUSB.dll as long as the device is uses HID class it will bind to HID driver and you should be able to get it working without any issues. 

In order to use CyUSB.dll refer to the following App Note, http://www.cypress.com/?rID=12974.

Inorder to get access to the CyUSB.dll and corresponding CyUSB.sys(for Windows XP and Windows 7) install USB Suite from the following location, http://www.cypress.com/?rID=34870 . 

The USB Suite installation provides the .Net library and the C++ library for USB communication. It comes along with reference guides and Example codes. Irrespective of which Cypress USB device is being used(FX2,FX3, PSoC), the program structure for the C# or C++ GUI is the same.

igor55's picture
User
2 posts

 Hi, 

I would like to read some ADC values in real-time without having to use the debugger and so I believe I'd want to try exactly what "U2" has posted in the 2nd post of this thread. I have a custom PCB using a PSoC 5LP chip, which does not have an LCD to simply read off, or USB interface. It does have a 10-pin header for the MiniProg3. The link in U2's post is dead; is there any remaining documentation and code for setting up the USB-I2C bridge using the MiniProg3?

Thanks for your help :)

user_1377889's picture
User
10803 posts

Just enter "i2c-bridge" at top of this page into the field "Keyword Search" and you will get plenty of docs to read.

Bob

igor55's picture
User
2 posts

Appreciate the speedy reply, Bob. I just did as you said and found documents mainly for the CY3240 and projects using PSoC Designer. Is there anything for PSoC Creator using the MiniProg3, or will I have to make do with these? I don't want to waste my time reading up on something if it will get me nowhere; hope you understand :)

user_1377889's picture
User
10803 posts

Look here : http://www.cypress.com/?rID=38050 and especially at the COM-guide to program your interface.

Bob

Log in to post new comments.