well ... maybe I'm too late ... but anyway ...
first:
Greetings, jvdcande, and Steve Bailey,
well said ...
next:
Greetings, Tom Her.,
so let’s get started with your homework assignment ... first of all you didn’t give us much to work with ... “for lighting control” doesn’t tell us enough about how the program is supposed to function ... it would be a good idea to post again and tell us things like:
“when the switch is turned off, the lights should stay on for X seconds and then go off automatically” ...
it would also be a good idea to show us what you’ve already tried ... and tell us what your “solution” is doing wrong ... then we can help you learn ...
but just in case you’re TOTALLY lost ... or just in case your instructor didn’t give you any more to work with than you’ve already posted ... here’s a short program to play with ...
[attachment]
work through this and answer the following questions:
suppose that SWITCH_X has been OFF for a very long time ...
(1) is LAMP_A off or on? ...
(2) is LAMP_B off or on? ...
now suppose that SWITCH_X is turned ON and left ON for a very long time ...
(3) describe the reaction of LAMP_A ...
(4) describe the reaction of LAMP_B ...
next suppose that SWITCH_Y has been ON for a very long time ...
(5) is LAMP_C off or on? ...
(6) is LAMP_D off or on? ...
now suppose that SWITCH_Y is turned OFF and left OFF for a very long time ...
(7) describe the reaction of LAMP_C ...
(8) describe the reaction of LAMP_D ...
if you need help with the timer instructions, look them up in this book:
Instruction Set Reference Manual
this little exercise should go a long way towards squeezing the educational “juice” out of your homework assignment ... here’s a pretty safe bet: your instructor doesn’t really care about how well you can control a couple of lights ... what he’s trying to do is encourage you to learn about how the timers operate ...
anyway, here’s a suggested plan of attack ... post some more details about the requirements of your assignment – and tell us what you’ve tried so far ... OR ... post your answers to the questions above ... OR ... to get the most bang for your buck – do BOTH ...
if it seems like you’ve just been getting a lot of harassment and little or no assistance, it’s because what you’ve posted so far makes it LOOK LIKE (and maybe we’re wrong here) ... but it looks like you’re asking us to do your homework for you ... that’s a big “no-no” on this forum ... basic idea: you work – we help ... how you choose to respond next will tell us quite a lot about whether you really want to LEARN something from this little assignment ... or if you just want to receive a passing grade ...
and incidentally, welcome aboard ...