🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

how to create while loop

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Submitted by Yogesh K on Mon, 03/14/2016 - 17:33 

 

vissim embedded 9.0

i want toggle the led continuously ,same like for generation of pulse signal witch repeat after particular interval of time. Ton= 10 microsec Toff= 60msec

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Submitted by pete on Tue, 03/15/2016 - 10:06.

    Hi Yogesh, Normally you would not use a for loop to burn time as it wastes CPU cycles needlessly. So one way to do this is to connect a pulse train block to the GPIO connected to the LED and run the diagram at 100kHz. Set the pulse interval to .06 sec. That will do exactly what you ask, but using interrupts so you can do a lot more with the remaining CPU cycles.