Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Using USB_UART with CY8CKIT-003.....PLEASE HELP!

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



Using USB_UART with CY8CKIT-003.....PLEASE HELP!
Moderator:
RKRM

Post Reply
Follow this topic



Using USB_UART with CY8CKIT-003.....PLEASE HELP!

pazuzu213 posted on 12 Dec 2011 11:11 PM PST
Member
3 Forum Posts

 Hi,

I have been struggling for days, trying to get the UART samples to work on my psoc3 board. 

I am now starting to wonder if UART can be used with my CY8CKIT-003 starter kit. 

All I am trying to do is, display the accelorometer data (X,Y,orZ) onto my computer via HYPER TERMINAL.

Please help! A sample which works with CY8CKIT-003, would help a lot!

 

THANKS SOO MUCH! 

-Sunny




Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 12 Dec 2011 11:33 PM PST
Cypress Employee
742 Forum Posts

Hi Sunny,

 

It is possible to use UART to communicate the Accelerometer readings from First Touch Kit via UART.

If you look into the schematic of the First Touch Kit, you'll find that the X, Y and Z axis outputs of the accelerometer are connected to Pins P3[5], P3[6] and P3[7] respectively. This is shown in the snapshot below:

 

 

 

You'll need to Use an ADC with 3 channel AMUX to convert to the digital values and send out the values on UART Tx.

You'll need to do a level shift on the voltage using MAX232 if you are connecteing it to the RS232 port of your Desktop PC. If you are using an external USB-UART converter, then there might be a provision to connect the Pins output directly.



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 12 Dec 2011 02:50 AM PST
Cypress Employee
742 Forum Posts

You need to connect the Tx of the PSoC to Rx of the external USB-UART dongle and connect the common grounds of the two boards.

The Accelerometer available on board has 3 pins for 3 analog output - X, Y and Z axis.

There are also 3 more terminals:

1) Enable

2) Mode

3) ST / MOT

 

These pins should be given appropriate signal for the Accelerometer to function properly.

For normjal mode of operation:

Enable = High

Mode = High

ST / MOT = Low

 



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 12 Dec 2011 02:58 AM PST
Cypress Employee
742 Forum Posts

A project was create to display the Accelerometer readings on the hyperterminal using UART.

The Hyperterminal snap-shot is as shown below:

 

The project is attached along with this post



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

pazuzu213 posted on 12 Dec 2011 08:47 PM PST
Member
3 Forum Posts

 Hey Dasg,

Thank you soo much for replying, and the sample code that you have provided.

I programmed the sample to my board, but when I connect hyper terminal to get the values from the board I am not seeing anything.

I am not sure, if it is my computer settings or if I need an accesory to my board. Below is the image of the board I am using. Are your using this same board?

Thanks so much again!

 

-Sunny



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 13 Dec 2011 03:39 AM PST
Cypress Employee
742 Forum Posts

Hi Sunny,

 

I too used the PSoC3 First Touch Kit (CY8CKIT-003) to create the project.

 

Here are some of highlights which might help you solve the issue:

1) Are you using the RS232 connector available on the Desktop PC to communicate using hyperterminal? If so, then you must also use a level converter such as MAX232 to convert to trhe RS232 level.

2) I tested using an external USB-UART Dongle. For this setup, the use of level converter was not required. The Tx of PSoC was connected to Rx of the dongle. Care should be taken that the Rx-Tx connection is always criss-cross (Rx -> Tx, Tx -> Rx). The grounds of the FTK and USB-UART dongle should be connected together for common ground.

3) What is the baud rate set in the hyper terminal? The UART in PSoC is configured for a baud rate of 9600 with no parity bit, 1 stop bit and no flow control. The same setting should also be set in the hyperterminal configuration.



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 13 Dec 2011 03:53 AM PST
Cypress Employee
742 Forum Posts

The snap below shows the hardware connection made.

 

PSoC -> USB-UART Dongle -> Laptop

 

 

Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 13 Dec 2011 03:55 AM PST
Cypress Employee
742 Forum Posts

Sorry, I wasn't able to put the snapshot in the previous post. I have attached the snap along with this comment.



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 13 Dec 2011 04:02 AM PST
Cypress Employee
742 Forum Posts

The snapshot of the Hyperterminal configuration is attached along with this comment.

 

Let us know if this helps.



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

kmmankad posted on 13 Dec 2011 07:14 AM PST
Top Contributor
268 Forum Posts

dasg has already cleared up all the important points,but if youre looking to implement UART with Interrupts,heres some code I wrote a few weeks back that could help you out.

kmmankad.blogspot.com/2011/12/psoc3-basic-uart.html

(It was written on PSoC Creator 2.0,and for the CY8CKIT-001)



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

pazuzu213 posted on 13 Dec 2011 07:50 PM PST
Member
3 Forum Posts

Hey Dasg,

Your first point is my problem! I do not have a RS232 connector. I was under the impression that I could keep the usb connected, which I used to program the board, to also use a serial port (silly me!). 

I will order the USB-UART Dongle. Is the one you are using, available to get from cypress? Thank you for all your help Sir!

@kmmankad:

I might be needing to use the UART with Interrupts after I get my current issue resolved. Thank you for the example!

 

-Sunny

 



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 14 Dec 2011 04:32 AM PST
Cypress Employee
742 Forum Posts

Hi Sunny,

 

The dongle which I used was purchased locally. You can use such a dongle to connect PSoC to the USB port of your laptop. If you are using a desktop PC, you can use the RS232 connector after voltage level translator MAX232.



Re: Using USB_UART with CY8CKIT-003.....PLEASE HELP!

Gautam Das posted on 16 Dec 2011 02:50 AM PST
Cypress Employee
742 Forum Posts

Hi pazuzu213,

 

It is possible to use the First Touch Kit itself to communicate using USB-UART. This requires you to tweek the board a little. A topic was posted in the forum where the use of USB on FTK was discussed. 






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: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20