how to create while loop

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

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

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    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.