Thanks for the quick response Darrel,
I tried your code and I feel like I am getting closer but...
first the delay was over 1 minute so by making DelayTime CON 1500 it is close to 10 seconds. Not sure if it is because I am using the internal oscilator and it is not as accurate as it should be but this is no isue.
Instead of turning off LEDs 1-5 after 10 seconds I need to turn on another set of Leds so I added TR1 VAR PORTA.0 up to TR6 VAR PORTA.5 and I used those in the select case and so far its all good.
I now face the following issues:
if I hold down any of the switches (SW1 to SW6) for 3 seconds, it should cancel the Delaytime that was going to turn on TRx and branch to a different label to do something else.
If I press and release a switch, 10 seconds later TRx turns on, I need to be able to press and release the same switch to turn off LEDx and TRx at once.
Another aspect I didn't mention because I will deal with it later is that when TRx turns on, if I don't manually press and release the switch to turn them off, after a set timed period (written in EEPROM) it will eventually turn off both LEDx and TRx
I have a feeling I am going to spend a few months on this...
Bookmarks