Creating delay loop in C++

Hi, @gabbar.

@KSKelvin provided some code but I thought that I might provide a somewhat simpler approach.

Not exactly sure that this matches your requirements. It delays 500us of Vin > Vref time before setting output high. Output goes low as soon as Vin < Vref. Anyway, maybe it will help.

–robert


delay.qsch (3.7 KB)
delay_x1.cpp (2.5 KB)