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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 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

0 Likes
1 Solution
Anonymous
Not applicable

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.

View solution in original post

0 Likes
12 Replies
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

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.

Anonymous
Not applicable

The snap below shows the hardware connection made.

   

 

   

PSoC -> USB-UART Dongle -> Laptop

   

 

   

 

   

lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

   

 

   

Let us know if this helps.

Anonymous
Not applicable

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)

Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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. 

0 Likes