Hmm have a problem else where. Just to verify my 10ms delay was working, I increased it to 1000ms. Now the flash (FET's)does not respond to the input. I can send a pulse and nothing happens, then I get lucky some times. Turns out that the program is running and pausing for 1000ms as though there has been a pulse sent.
So the problem I have is it is running through the whole program and not returning to MAIN and waiting for a pulse.
This should make the program jump back to the start of MAIN unless the ADC is 466 or higher, right?Code:IF (BNK1 => 466) OR (BNK2 => 466) THEN FLASH goto MAIN
the program is running the FLASH routine without actually sending a pulse out to the FETs unless one of the inputs is triggered. I know this because I can measure the time delay between applying an input signal and waiting for an output.Code:FLASH: IF PORTA.4 = 1 OR PORTA.5 = 0 THEN PORTB.0 = 0 : PORTB.1 = 0 : PORTB.3 = 1 endif IF DUR = 1 THEN PAUSE 1 endif IF DUR = 2 THEN PAUSE 2 endif IF DUR = 4 THEN PAUSE 4 endif IF DUR = 8 THEN PAUSE 8 endif PORTB.0 = 1 : PORTB.1 = 1 : PORTB.3 = 0 PAUSE 1000 GOTO MAIN
So my question is, why is there up to a 1 second delay between applying a signal and getting an output?




Bookmarks