How do I generate the specified number of high speed pulses(CY8C24894)

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

cross mob
Anonymous
Not applicable

Hi everyone,

I need to generate 30 high speed pulses reach 12MHZ ,

so I try to control GPIO pin as following code to achieve my purpose but its speed is around only 1MHZ

for (i=0;i<15;i++)

{

PRT5DR&=~0x02;

PRT5DR|=0x02;

}

I try another way using other user modules like Counter, Timer or PWM, their speed can reach 12MHZ but I can't stop them immediately when counting to the specified number I want, even I use interrupt.

Dose anyone can give me a suggestion for this?

thanks~~

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

Difficult when running at the rim of maximum frequency. Consider switching to PSoC4 which could handle that in hardware.

Bob

0 Likes
Anonymous
Not applicable

Thanks, maybe will consider using PSoc4 as your suggestion.

0 Likes
lock attach
Attachments are accessible only for community members.
LuNo_297436
Level 3
Level 3
First solution authored 10 replies posted 10 questions asked

Hi Ranny Lou

Is this close to what you need?

For resetting the counter that generates the pulses you can use a pin connected to a row input combined with the compare out from second counter in a LUT.

Best Regards

Luis

0 Likes