fx2lp timer

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

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

fx2lp pin 50 is connected to another device.i wanted to generate 2 mili second pulse(active high) from this pin.

so i am using timer for delay genaration.i need 2ms active pulse .how to make pin no 50 initaily low .

fx2lp is operating at 24MHZ,TIMER run at the same rate,

how to put this in code.??

pin 50 at logic low

2ms_delay();    //pin 50 at logic 1 upto 2 mili seconds.

pin 50 at logic low.

regards.

0 Likes
1 Solution

Hello Geethanjali,

Please let know if the mentioned implementation is suitable to your application.

PD5 = 0; // Drive LOW

if(<condition>)

{

PD5 = 1; // Drive HIGH

EZUSB_Delay(2);   // Generate 2 ms delay

PD5 = 0; // Drive it LOW

}

Best regards,
Srinath S

View solution in original post

0 Likes
26 Replies