- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Everyone,
I am new to the PSoC World. I am trying to make HW connections between digital input and output pins on PSoC 4100S Plus Prototype kit.
Which mean i am trying to connect User Switch ( SW1 )in Resistive Pull Up Mode with (HW connection) enabled to User (LED1) with (HW connection) enabled.
As soon as i enable the drive mode as Resistive Pull up for the switch i get and error. Can anybody tell me what is the problem ?
Basically i am trying to see the HW connection works by any means. So, thought this might be the simple way to do.
I will wait for the experts answer.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
At first glance, I thought your question was easy one, but when I tested it with my CY8C4146LQI-S433 board, I realized that it was not.
With PSoC 4 EVB such as CY8CKIT-042, your approach will work as it allows normal connection between pins and the LEDs are Active Low.
But with the board you are using, LED is Active High.
And when I tried similar thing with my board,
I could not even connect two pins,
instead I needed to use SmartI/O to specify the relation between the input pin and output pin.
SmartIO config
LUT4 config
And also I needed to "Start" SmartIO at the beginning of the program.
main.c
======================
#include "project.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
SmartIO_1_Start() ; // <----
for(;;)
{
}
}
======================
After that I could reflect the SW1 to LED_BLUE, I think without any CPU intervention.
Note: but as I configured SW1 as High Imp. Digital, to clearly turn off the LED I needed to touch VDD with input signal. (I wonder what is the recommended method)
Meantime, I tried to find pin couples which are not SmartIO and be able to be directly connected in the schematic of CY8CKIT-149 but could not find any, so far.
But assuming the circuit you showed could be compiled, if you change the input pin to other user usable gpio, touching the input to VDD (via some resistor) will turn the LED on.
Attached is my trial project,
I tested it with my CY8C4146LQI-S433 board,
and changed the device to CY8C4147AZI-S475,
it is compile-able, but I could not test it on that device.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lingling,
Thankyou for the reply . I have seen your Project. The design you have suggested has no HW Connection enabled . For such configuration we must at least write a piece of code. But what i am looking is to have the pins tied together inside the PSoC device and control the user LED from the user switch without any intervention from the ARM core(no Programming).
Your Design:
Desired Output:
I would like to see something like this :
Therefore Switch is Obviously Digital Input pin and LED is Digital Output Pin.
In my first Post, i was trying to make the switch to have Resistive PullUp Mode because Switch is Active low according to circuit diagram of PSoC4100S Plus and LED is also Active Low.
Since PSoC creator was not allowing me to set the Drive Mode to the above, so i have opened this discussion.
I hope you have understood my question.
Thanks you once again.
Note : According to PSoC101 cypress website it is possible to do this in CY8CKIT-042 PSoC 4 Pioneer Kit. But i am not sure if the same can be reproduced in another
PSoC 4 kits like here.
Regards,
Naveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
At first glance, I thought your question was easy one, but when I tested it with my CY8C4146LQI-S433 board, I realized that it was not.
With PSoC 4 EVB such as CY8CKIT-042, your approach will work as it allows normal connection between pins and the LEDs are Active Low.
But with the board you are using, LED is Active High.
And when I tried similar thing with my board,
I could not even connect two pins,
instead I needed to use SmartI/O to specify the relation between the input pin and output pin.
SmartIO config
LUT4 config
And also I needed to "Start" SmartIO at the beginning of the program.
main.c
======================
#include "project.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
SmartIO_1_Start() ; // <----
for(;;)
{
}
}
======================
After that I could reflect the SW1 to LED_BLUE, I think without any CPU intervention.
Note: but as I configured SW1 as High Imp. Digital, to clearly turn off the LED I needed to touch VDD with input signal. (I wonder what is the recommended method)
Meantime, I tried to find pin couples which are not SmartIO and be able to be directly connected in the schematic of CY8CKIT-149 but could not find any, so far.
But assuming the circuit you showed could be compiled, if you change the input pin to other user usable gpio, touching the input to VDD (via some resistor) will turn the LED on.
Attached is my trial project,
I tested it with my CY8C4146LQI-S433 board,
and changed the device to CY8C4147AZI-S475,
it is compile-able, but I could not test it on that device.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi moto,
Thanks for the reply. First of all thanks for correcting my info. "But with the board you are using, LED is Active High."
Yes, mine is Active HIGH LED.
Ok, I have tried your previous attached project and here is what is have found.
1. After i flash the project to the MCU the LED Status will be HIGH (1) (Turned ON)
2. When i press the button SW1 then, there is no change in the status of LED.
3. As you mentioned Touching the VDDD pin and Pressing the Switch haven't brought any changes in too.
However, "touching and VDDD pin" and "Touching the button" (not Pressing it )makes the LED turns OFF which is strange .
Seems like button acting as the touch input and that is also sporadic.
My Tryouts(just being curious):
1. I have also tried making the different combinations of initial drive state and LUT4 input combinational logics
But the result is just inverted with the current scenario.
2. I had tried it another new PSoC4100S PLUS with revised hardware version But the result is same.
So, Even the Smart I/O with computational logic failed us.
What do you think now !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Naveenkumar-san,
One thing I failed to mention in my previous response was that since the SW is Low when pushed,
I set the input pin's initial state to 1 and configured the LUT as just like NOT.
If I was using PSoC 4 EVB, I would have written
But as I could not find "NOT" gate, I used LUT as
When gpio7 is 0, output is 1, gpio7 is 1, output is 0.
But as finally we agreed that the LED is active High we need a circuit something like
Then I would modify the LUT as
When gpio7 is 0, output is 0, when gpio7 is 1, output is 1.
With this if I jumper SW pin to VDD via a 10K resistor, LED turns on
and if I jumper SW pin to GND via a 10K resistor, LED turns off.
At least with my CY8C4146LQI-S433 board, it is working so.
So my conclusion is that with the circuit above (which utilizes SmartIO and LUT)
the internal circuit is configured as we hoped.
But since the SW is not capable of generating High and LOW,
I needed to touch VDD and GND via a resistor to make the signal level High and Low.
I hope this would be the same for your board/MCU.
Please let me know your result.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I re-studied the schematic of CY8CKIT-149.
They set pull-up to the reset pin.
But they have not set pull up to SW1
So I think that without an external pull-up, SW1 won't be very useful.
Then I searched P3_7 in the schematic, and found P3_7 at pin 2 of J2 connector (CON30)
so we can pull up the button using this connector!
So if you can add a resistor (10K ~ 15K ?) between J2-2 and VDDD
the schematic will look like
And with this schematic, if you configure the LUT just like "NOT",
I hope that the SW1 will serve you as you expected.
Note: As usual, as I don't have CY8CKIT-149, I only could confirm that the project can be built.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Moto-San,
Hurrah !!
I have tried it in both ways
1. Making a connection between VDDD and SW via 15K resistor. [GPIO7= 1 ; OUT= 1], [GPIO7= 0 ; OUT= 0] [DIRECT]
2. adding a resistor (10K ~ 15K ) between J2-2 and VDDD. [GPIO7= 0 ; OUT= 1], [GPIO7= 1 ; OUT= 0] [NOT GATE]
and it is working flawless.
Finally PSoC4100S Plus demystified with direct connection without the intervention of ARM CORE.
Thanks to you Moto-San and thanks for helping me to get through this.
Your description and info are very detailed and good to follow.
Hope we come across with another problem again