- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am new to psoc creator software. I have gone through the training from the website. I got some help from that training but still getting trouble in writing the framework. I am not able to write the proper api fuction or how to select the function for my project. How do i get the list of api's or the c functions?
For example if i want to check the status of a pin which fuction should i use?
Thanks.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you right click on component there is typically a datasheet with
an API section in it describing each API and its call, parameters, etc.
Also there are a # of ap notes associated with the part, and a video
training library on web site.
http://www.cypress.com/?rID=93401 AN86439 - PSoC® 4 - Using GPIO Pins
http://www.cypress.com/?rID=57571 AN72382 - Using PSoC® 3 and PSoC 5LP GPIO Pins
http://www.cypress.com/?rID=38267 AN54460 - PSoC® 3, PSoC 4, and PSoC 5LP Interrupts
http://www.cypress.com/?id=1162&source=home_support Video Training
http://www.cypress.com/psoccreator/ Creator
http://www.cypress.com/?rID=60890 AN77759 - Getting Started with PSoC® 5LP
http://www.cypress.com/?rID=43337 AN61290 - PSoC® 3 and PSoC 5LP Hardware Design Considerations
- 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
When you look at the warning in your program you'll see that your "if" has no body to execute because you ended it with a semi-colon. I would further suggest you to implement an else branch to switch off the LED.
A tip: alter every program so that there are no errors nor warnings. What kind of development kit have you got?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This might help -
http://www.cypress.com/?rID=57571 AN72382 - Using PSoC® 3 and PSoC 5LP GPIO Pins
Also look at system reference guide, under Creator help menu., for APIs to control
GPIO.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm having psoc 5lp kit. Is my code which i have written is correct ? i have made the changes which u have pointed out.. still it is not working... where i have made mistake i couldnt find it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you check the external connections?
And: The switch in your kit connects to GND afaik, so select for the input pin's mode "Resistive pull up" initial drive state "High"
I cannot see whether your program is correct, please upload the actual version.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
uploaded the project..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure?
Bob
- 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
You did not follow my "else"-advice.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Bob... i have done it finally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes i have done with "else" statement. if working.. but with one problem. the logic in the code is opposite.. like for 0 it showing logic 1 and for logic 1 it showing logic 0..
i have done one more project just now.. it is like if you sw1 led starts to blink and when u press sw2 led stops blinking.
but the switch state and the "if" statement is not matching.. logic is opposite. how o rectify it?
i am uploading my second project.. just have a look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When working with the PSoC5 Kit and using some of the internals as a switch it is always advisable to have a look into the schematics (have already been installed on your system). There you will see that your switch connects to GND (0V) when pressed, so you would read a logical zero in this case. When the switch is released you will read a Hi because we defined a pullup resistor for that pin. This is nothing you could change, since that is soldered in the hardware.
So, when you swap the lines in the if and else branches all would be good. You even might avoid the if by writing
LED_Write(!SW_INP_Read()); // Write negated value of switch to LED
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank u Bob.. i will use this in my next project.