UART functioning

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

cross mob
Anonymous
Not applicable

I am using CYACKIT-00 PSOC development kit... and to check whether UART is functioning or not i tried connecting arduino Rx-Tx directly to Tx-Rx of kit and even the ground are kept common still there is no communication between the two.. what could be the possible error... reply ASAP..thnks

0 Likes
13 Replies
Anonymous
Not applicable

also with DSO i checked whthr TX is trannsmitting anythning..but i cnt c ny waveform displayed on DSO that mean the pin i m programmin as transmitter is not configured as TX properly..so whr all should i make the changes..?

0 Likes
Anonymous
Not applicable

Hi PRIYANKA,

   

 

   

Are you using UART in Full Duplex or Half Duplex mode?

   

1) You need to connect the Tx of PSoC to Rx of Arduino and Rx of PSoC to Tx of Arduino.

   

2) The ground pin (Pin 5 of DB9 connector) should be connected to the ground of Arduino board.

   

3) Make sure that the baud rate of both the transceivers are the same (eg 9600, 19200, etc).

   

4) You can get started by experimenting with the UART example project shipped along with PSoC Creator. In the Component Catalog right-click on the UART Component and select "Find Example Project". You can modify the example project according to your requirement for interfacing with Arduino.

0 Likes
Anonymous
Not applicable

PRIYANKA,

   

 

   

Here are some of the questions which will help you narrow down on the error:

   

1) Assuming that you are using CY8CKIT-001 kit, are you using the port pins directly (TTL Logic) or using the RS232 voltage level (utilizing the on-board MAX232 and DB9) for communication? If you are using RS232, then the jumper J10 (RS232_PWR) present close to the DB9 connector should be closed.

   

2) Are the pins set to the right drive modes? The Tx Pin should be a Digital Output pin with a "Strong Drive" mode. Rx Pin should be a Digital Input pin with "High Impedance Digital" mode.

0 Likes
Anonymous
Not applicable

hi.. we r not using any voltage converter(MAX232). We r directly connecting RS232 PSOC to RS232 of GSM module..

0 Likes
Anonymous
Not applicable

Hi PRIYANKA,

   

 

   

A project was created for Interfacing PSoC 3/5 with GSM Modem. It can be found in the following forum topic:

   

http://www.cypress.com/?app=forum&id=2232&rID=52896

   

 

   

What I understand from your statement is that you are using DB9 connector present on PSoC3 kit and the DB9 connector present on the GSM Modem for this interface.

   

For a PC, the DB9 connector (male) has the following pinout:

   

Pin 2 = Receiver

   

Pin 3 = Transmitter

   

Pin 5 = Ground.

   

 

   

But other development boards (including PSoC development kit and GSM Modem) will have the Rx and Tx pins in reverse order, that is, Pin 2 = Transmitter and Pin 3 = Receiver.

   

So, if you want to interface GSM with PSoC development board, you'll ned to connect Tx and Rx in criss-cross fashion. You can get UART cable which has this configuration or build one using a 2+1 cable and inverting the connection (Rx --> Tx and Tx --> Rx).

0 Likes
Anonymous
Not applicable

 Try not to connect to any thing, just with the Psoc board, and sent something like 0xAA via the uart in a loop. See if you can get any waveform from the UART output pin first.

0 Likes
Anonymous
Not applicable

I happened to be on-site and the problem is now rectified.(it was a drive mode issue)

0 Likes
Anonymous
Not applicable

Nice to hear that. 

0 Likes
Anonymous
Not applicable

thnks a lot dasq... it wrkd.. 🙂

0 Likes
Anonymous
Not applicable

one more prob... i tried communicatin two psoc kits thru UART i/f... one is transmittin and the other is receivin.. but in receiver PSOC lcd , its nt reading the character sent by TX but rather displayin upside dwn U ... is this sm prob in setting again..???

0 Likes
Anonymous
Not applicable

PRIYANKA,

   

 

   

1) Can you please tell us more about the configuration of UART you are using?

   

2) What is the Rx Buffer size you are using? If the Rx Buffer size is more than 4, then "Rx On Byte Receive" is enabled on default and Interrupt will occur upon receiving a byte.

   

Enable the Global Interrupt  by uncommenting the CyGlobalIntEnable in the main code so that the ISR will be executed.

   

3) Powering of both the device has to be taken care of. Make sure that the Receiver PSoC is initialized before the transmitter PSoC starts transmitting.

0 Likes
Anonymous
Not applicable

Priyanka,

   

A couple of things:

   

1.Please upgrade to the latest version(1.0 SP2 as of today) available.(You can collect it from me,rather than downloading it)

   

2.I have thrown together some code,for basic UART Rx with an Interrupt Routine to handle that data,do go through it.This code works with no issues.

   

Possible pitfalls that youre stuck in:

   

-Disable Address mode : Set that to None.(we're not doing 485)

   

-Clearing Interrupt : Use a call to UART_ReadRxStatus(); to clear the interrupt

   

 

   

Anyway,check out the attached code.

0 Likes
Anonymous
Not applicable

No idea why I'm never able to attach docs.Drop me an email at kmmankad at gmail for the code.

0 Likes