UART example

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

cross mob
Anonymous
Not applicable

 i have a link here that is an example of UART. 

   

http://www.cypress.com/?docID=35078

   

what is the VR pin of j5? to it we are connecting the p0.1 analog input pin. why? Is it directly connected to the UART?

0 Likes
22 Replies
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

P0[1] is the A/D input, and is conencted to the pot (R7) wiper on J7,

   

pin 4. Thats to allow varying the pot and transmitting the A/D result of

   

the pot wiper voltage via the UART.

   

 

   

UART is just connected to P2[5] and P2[7]

   

 

   

Regards, Dana.

   

 

   

0 Likes
Anonymous
Not applicable

Hi Nivi,
Your question is seems difficult to answer but.
Have you learn about Electronics, Signal processing?
      

              

   

Every signal need to handle step by step.
For this example, There are signal and modules,
Each module has each role.      

   

  

   

A signal is the voltage of that get from VR.
First step is PGA due to amplify the signal.      

   

    

          

   

Next is ADC, DelSig that convert analog voltage into digital value.
The digital value(it mean voltage of VR) can transfer by UART to the PC, etc.      

   

  

   

The analog value(VR voltage) can't transfer by UART directly,
This is a reason of your question why.      

   

Are you able to get something from this?
 

   

Best way to understand that is
To be work with this example, and Measure signal step by step,
And finally accept signal by the PC.      

   

    

          

   

That is I guess. Feel free ask again.      

0 Likes
Anonymous
Not applicable

 @PSoC73: I apologize for not responding sooner. I had not realised that it was just an instruction pertaining to hardware connections at that time. Thank you anyway for replying.

0 Likes
Anonymous
Not applicable

Hi every body! Help me!!!

   

I have a prolem when PSoC conect to PC via RS232 circuit (UART).

   

I need:

   

- PSoC recieve data from PC send (char,string...).

   

- If PSoC receive character 'a', turn on led; else turn off led.

   

Pin:

   

P0.4: RX

   

P0.5: TX

   

P0.3: led

   

Currently, hardware is fine. But code not work as i need!

   

I checked configuration PSoC, code of my project.

   

I upload my project for every body.

   

Can you help me, please?

   

I do this project because i will do project: 

   

-P0.4 receive data (char, string...) from pC.

   

-P0.5 forward data that P0.4 received to PC.

0 Likes
Anonymous
Not applicable

 Sorry! My project here.

0 Likes
Anonymous
Not applicable
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Just a check, you have a RS232 transceiver connected to your PSOC

   

to develop RS232 levels for the PC serial interface ?

   

 

   

Also I see you are driving LED by setting port to high, implying LED wired from Vss to

   

a series R to pin. The pin cannot source as much current as sink, better you connect LED

   

to Vdd to series R to port, and turn it on driving pin to "0", Vss.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Hi you,

   

About RS232 circuit which i used: it is good because i coded a example to test.

   

- TX on PSoC transmit data (char, string) to PC, PC received data and show well.

   

- But RX on PSoC can't work. 

   

(I'm using software: Terminal 1.9b to check communication between PSoC and PC)

   

I use 1 led to test, not more. I think project has no prolems with that led.

   

Can you check about configuration of my project, please?

   

Or, Is code incorrect?

   

I have just studied PSoC!

   

Many thanks!

   

 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Just to check: Are you using a voltage-level shifter between PC-Tx and PSoC-Rx lines or are you trying to fry the PSoC with +-12V ?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I'm using a voltage-level shifter between PC-Tx and PSoC-Rx lines by IC MAX232.

   

Details:

   

PC  <->USB to COM <->RS232 circuit (using MAX232)<->PSoC CY8C24123A.

   

(Pin:

   

- P0.4 (RX of PSoC) connect pin 12 max232.

   

- P0.5 (TX of PSoC) connect pin 11 max232.

   

)

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

It is not a good idea to have the LED on the same port as the UART when you are writing to the data register!!!

   

Better use an LED-component which will use a shgadow-register internally.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Hi Bob,

   

I will try connect led to another pin (not in PORT0), conect to PORT1 (P1.1 or P1.0, because I'm using PSoC CY8C24123A).

   

Can you send a project(communication between PSoC1 and PC, UART) for me if you had, please?

   

Contents:

   

-PSoC RX receive data (char, string...) from pC.

   

-PSoC TX forward data which P0.4 received to PC.

   

Many thanks for your help!

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

On the opening page of PSOC designer is a link, ~ 1/2 way down page, "Launch

   

Example Browser", and there are several UART projects you can try out/modify.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Hi Bob, Dana

   

I tried to code (refer CE54939-UART User Module Example Project, PSoC designer 5.4):

   

- PSoC-TX transmit data to PC well.

   

- PSoC-RX can't receive data from PC.

   

I checked by software: hyperterminal, terminal 1.9b, X-CTU.

   

I can't understand problem which i having.

   

My project here, can you check it for me, please?

   

Many thanks!

0 Likes
Anonymous
Not applicable

 I'm sorrry! My project!

0 Likes
Anonymous
Not applicable

Hi.

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

Hi Bob, Dana

   

and here is code (i modified pin which led connect, refer code ViDuUART_OnlyChar_15052014.zip).

   

P0.4: PSoC RX

   

P0.5: PSoC TX

   

P1.1: led

   

Results:

   

- PSoC TX trasmit data to PC well

   

-Probelm: PSoC RX can't receive data from PC.

   

Thanks!

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Your clock settings compared to project not same, see attached.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thank you so much!

   

I have sloved problem.

0 Likes