I need help to build the project by use PSoC creator with CY8KIT-059

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

cross mob
Anonymous
Not applicable

Hello~

   

I am a newbie to use PSoC creator with CY8KIT-059.

   

Well, the input section of my project is that when using 4 position switch, I have to select one of clock inputs.

   

Since I am a beginner about using PSoC creator, then I really need some ideas how to build the input section of my project.

   

Thus, my questions are 

   

1. How to set up the four position switch

   

  - use debouncer in cypress section or use switch in off-chip section?? 

   

2. How to select the one of clock inputs after setting up the four position switch

   

 

   

Thanks

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

Welcome in the forum.

   

Usually we do:

   

Use a digital input pin component with 2 pins. Set the pins to Digital input resistive pull up initially drive high and input double sync.

   

The switch has to connect the pin to gnd when active.

   

Read the pin using ~PinName_Read() & 0x03. This will result in the correct switch position 0 to 3.

   

Debouncing can be done in software by waiting a few ms using CyDelay() and re-read the pins until the result is stable.

   

Alternatively you may use a debouncer component.

   

In the Component Catalog, under System you will find a Clock component which you may set to your desired frequency.

   

When you get stuck, just post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Happy coding

   

Bob

View solution in original post

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

Welcome in the forum.

   

Usually we do:

   

Use a digital input pin component with 2 pins. Set the pins to Digital input resistive pull up initially drive high and input double sync.

   

The switch has to connect the pin to gnd when active.

   

Read the pin using ~PinName_Read() & 0x03. This will result in the correct switch position 0 to 3.

   

Debouncing can be done in software by waiting a few ms using CyDelay() and re-read the pins until the result is stable.

   

Alternatively you may use a debouncer component.

   

In the Component Catalog, under System you will find a Clock component which you may set to your desired frequency.

   

When you get stuck, just post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Happy coding

   

Bob

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

Hello, Bob.

   

I just finished to build the input signal circuit; thus, I want to check up how my two outputs are working.

   

Since my two outputs are time frequencies, I want to display a time diagram, which looks like a square wave form to use only PSoC creator.

   

Is it possible to display a time diagram of my two outputs in order to only use PSoC creator??

   

I attached my project.

   

 

   

Thanks 

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

You could try using the LCD with special characters for rising edge, high level falling edge and low level to display your signals. The LCD is comparably slow, update frequency should not be larger than 10Hz (100ms).

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello,

   

I am sorry that I could not understand how to display my two outputs by using LCD.

   

At first, I tried to connect one of output with Graphic LCD 16-bit parallel interface macro after removing a pin of "OUT_SUB"

   

Then, I clicked a button of "build design" then successfully  finished. 

   

Then, I thought that I could see my result of one of outputs frequency on some window screen. but  I could not see anything.

   

Can you more explain about using LCD to show the time diagram of my two outputs results on my window screen??

   

 

   

Thanks

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

I see no chance to display your data on the windows screen. Use a logic analyzer.

   

 

   

Bob