settle:
gosub A_to_D
high yellow_l : high yellow_r
if amp < 14 or amp > 18 then pause 500
if amp < 14 or amp > 18 then settle
if amp > 14 and amp < 18 then pause 7000
gosub A_to_D
if amp < 14 or amp > 18 then settle
if amp > 14 and amp < 18 then low yellow_l : low yellow_r : ampon = 0
the PIC16F877 is waiting for the amp value to settle. sometimes this code works..sometimes it appears to skip line 6 (no delay) and line 9 (outputs are not set low). Any one have any suggestions??
Bookmarks