- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
i have facing one problem.
a problem is my one gpio pin is turning off and same time my second gpio is turning on but both have some time difference i.e.
Gpio1 is taking the 1.4 Micro Second to turn off
and Gpio2 is Taking the 800 Nano Second. to turn on
i don't know why it is Happening ?
anybody can suggest why it is happening and how can i solve this problem.
i am using LP-035 controller.
Best Regards,
Seggi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Seggi,
If code is the same, the time should be same. There is some difference in the code. Please post your project here: (1) Build->Clean, (2) File->Create Workspace Bundle->Minimal. (3) In created Archive you may delete a folder Generated_source to reduce the size.
Generally, Pin_Write(1) API is rather slow and takes almost a microsecond, but there are faster ways to accomplish that. Please check this video:
C++ vs Assembly vs Verilog. on Vimeo
On PSoC5 the following code should set Pin_1 to 1/0 in a single BUS_CLOCK (Compiler optimization = speed, release mode)
for(;;)
{
Pin_1_DR = 1 << Pin_1_SHIFT; // shif=1u
Pin_1_DR = 0 << Pin_1_SHIFT;
}
/odissey1