- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
i am following this website
here i am trying to add a new rtos task and want to give delay but in that project i am unable to modify delay.
since i am new to psoc can you tell me how to set pin for GPIO and set delay by using programming not by vydwr file where you just change pin button by GUI. That i do not want. I want the layer where pin no and delay can change.
Thank you
so please help me out
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vinay,
There is a function called CyDelay(), the argument is the ms delay you need. This will give delay. However please note that the delay may not be very accurate, since this is firmware implemented delay.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But you did not tell me where to look for GPIO as i want to create 4 task where i want to assign 4 pin for digital output( FOR LED OUTPUT).
I do not want using GUI.
Example- In any microcontroller we assign pin for output but where is that pin assign thing in PSOC5LP.
I want little deeper in control in hardware address level. where you people give address or one name for that pin. how to access that pin or change that pin as per our requirement.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"I do not want using GUI.
Example- In any microcontroller we assign pin for output but where is that pin assign thing in PSOC5LP."
You better use the IDE which has a GUI interface to the user.
A PSoC is not "any microcontroller". As opposed to any microcontroller it contains a lot of real hardware. Though PSoC is not a FPGA, some of the internal hardware will be routed at build-time and the connections to the pins/ports are part of that process.
Yes, there is a possibility to make these connections "manually", have a short(!!) look into the PSoC5 Register TRM.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This doc is too much deep. what i want is to blink an 4 LED(4 Task) using Free Rtos in this psoc kit. so for that i created rtos task but i do not know how to call particular pin,set that pin and making that pin high and giving some delay using CyDelay() function.
waiting for your reply
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use Creator 3.3 as IDE. There is a bunch of videos (each about 5 to 10 minutes) on how to use Creator. Will take you an hour to learn enough.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for quick reply
i am sharing a simple code where can you tell me how to assign pin one for output.
#include <project.h>
int main()
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
Pin_write(1u);
CyDelay(500);
Pin_write(0u);
CyDelay(500);
/* Place your application code here. */
}
}
/* [] END OF FILE */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for example on port 1 pin 1 how to select that as a output pin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot do that in code as I told you in my last post. You need to do that in Creator 3.3 IDE. Did you already download and install that?
In Creator you need to drop a pin component onto your topdesign sheet and configure it as input, output, inout etc.
You will see in the Workspace Explorer window a .cydwr file (stands for Design-Wide Resources). When you open that file you can set your pin component to a physical pin location of your PSoC5.
Bob