Where is Example Code for Simple 8-Bit UART Communication Ex. Located?

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

cross mob
Anonymous
Not applicable

Pardon the ignorant question. I'm attempting to introduce myself to PSOC UART programming by studying the document entitled, "Simple 8-Bit UART Communication Example – PSoC® 3 / PSoC 5," at link, http://www.cypress.com/file/50321/download. I have one simple question: Where exactly can I find the code examples that it is referring to, such as in the Design Wide Resources section of page 3, which says to " Refer to the Example_UART.cydwr file for the settings," or under the Operation section of the same page, which says, "In this example a flag, ‘flag_keyPress’ is set inside ISR_UART.c."? 

   

The answer must be obvious, but I'm pulling my hair out trying to find this example code, which is not included in the document. This is totally new to me so I was hoping to study an existing code example this document is referring to.

   

Thank you.

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

Welcome in the forum!

   

Creator Start Page -> Find example project

   

Creator Component Catalog: right click on the component and select "Open Example project"

   

Creator topdesign right click on the component and select "Open Example project

   

I would suggest you to set Tx and Rx buffer sizes to ~100 which will use internal interrupts to fetch the data. Use _GetRxBufferSize() and GetTxBufferSize APIs to see if there are already (Rx) or still (Tx) bytes in the buffer.

   

 

   

Happy coding

   

Bob

View solution in original post

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

Welcome in the forum!

   

Creator Start Page -> Find example project

   

Creator Component Catalog: right click on the component and select "Open Example project"

   

Creator topdesign right click on the component and select "Open Example project

   

I would suggest you to set Tx and Rx buffer sizes to ~100 which will use internal interrupts to fetch the data. Use _GetRxBufferSize() and GetTxBufferSize APIs to see if there are already (Rx) or still (Tx) bytes in the buffer.

   

 

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable

Thank you!

0 Likes
Anonymous
Not applicable

In the Creator Component Catalog, I don't find the component, "ADC_DelSig". I previously imported that component into my project, so it shows up in the Workspace Explorer area of Creator, but not in the Component Catalog. I'm not sure how to get it to show up in the component catalog so that I can "Open Example project". Also, I can't drag the ADC_DelSig component from the Workspace Explorer into the TopDesign alongside the UART component, which is why I'm trying to get it into the component catalog.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

What device are you using? That example no longer exist on the Cypress web site I will try and construct a program for you if you can tell me what device you are using an if you want the ADC or just a TX/RX Uart.

0 Likes
Anonymous
Not applicable

Thank you very much for your help, and as I mentioned, I'm looking for code that I can use to learn from since I'm very new to this, so thank you. I'm using Cypress board CY8C5B08LTI-LP097. I appreciate your help.

   

As a seperate question, does there exist any example on the Cypress website with a simple 8-bit UART where communication is being done between the keyboard, the Cypress board, and a hyperterminal? I'm just curious. I'm also curious why the document itself didn't include the code that it was referring to in the first place.

0 Likes
Anonymous
Not applicable

Oh, I forgot to answer the second part to your question. I would like a Tx/Rx Uart which uses the ADC and writes to hyperterminal using interrupts to write something in a write buffer, such as "you pressed the wrong key" if an 's' is not pressed, and writes to hyperterminal an 's' if 's' is pressed, or something like that. This is all so foreign to me. Should I be able to come up with this from scratch? Feeling a bit dumb right now.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

That is a very old example program and the components are old that is why it is not provided.  Do you mean a CY8C5888LTI-LP097 kit board?

0 Likes
Anonymous
Not applicable

Yes, that is exactly it.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

ADC_DelSig is not used in the PSOC 5LP  it name in the Component catalog is Delta Sigma ADC.

0 Likes
Anonymous
Not applicable

The only thing I see in the component catalog of PSOC Creator 3.3 under ADC is Sequencing SAR ADC [v2.40].

0 Likes
Anonymous
Not applicable

Thank you. I'm trying to adjust the Rx and Tx buffer sizes in the UART Configure window to 1, but the software won't let me. I'm currently following the "Simple 8-Bit UART Communication Example – PSoC® 3 / PSoC 5", and it instructs me of the necessity, in this example, to change the buffer sizes to 1, but the software won't let me save that and changes it back to the default, 4. Can anyone tell me how to do this?

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is your program my board  uses com port 4. You need to use device manager to determine the correct com port for your board.  I use Putty for  a terminal program it works I tested it and it is working fine.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
        When you change a settings you have to press apply in the component window. That will save the changes. Then press save all in the file menu .   
0 Likes
Anonymous
Not applicable

Thank you, but it's not working in this case. I'm using PSOC Creator 3.3 . I double-click on the UART component that I dragged onto the grid in order to open the configure window. I click on the "Advanced" tab and then attempt to enter a "1" into Rx and Tx buffer size field. Immediately after typing the "1" in either of those fields, a red exclamation point appears to the left of the field. I hover over that exclamation point and a message appears saying, "Rx [or Tx] Buffer Size Must Be In Range between 4 and 65535". I don't understand why the Cypress example states to change it to "1" when it's not possible to do so. Is there something I need to do to make this possible?

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

The instructions you are using are for old components that have been upgraded.  The TX and RX buffer can't be less than 4.  The program I sent you works with the 4 size buffer. Check the PDF file in the new program it doesn't say to set it to 1.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Always use the latest code and information.  Your example was written in 2012 that is a long time ago and the PSOC components have been updated many times since that date.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is where they changed the Component.  It was chanced in Version 2.10 we are now running version 2.50. I am running PSoC Creator  3.3 CP3 (3.3.0.9604).

   

0 Likes
Anonymous
Not applicable

Thank you. 

0 Likes