On Fri, Apr 19, 2002 at 02:34:46AM +1000, electme wrote: > At 08:21 am Thursday 07/03/2002 -0700, you wrote: > >Somebody on here...I'm sure it was on here....sent me some code that > >controlled some lights so they came on at sunset..etc. I can't find the > >code, and I was going to see exactly what it was it did.... > > > >Anyone recall this? I know...simple thing, but nice to see how someone else > >approached the problem. > > > >_________________________________________________________________ > >Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > >-- > >http://www.piclist.com hint: To leave the PICList > >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > hi , i saw your post . did you get any replys or find your code . i'd be > interested to have a look too. > tia That probably was me. The code is here: http://www.finitesite.com/d3jsys/clock.asm Note that it uses an interpolated sunrise/sunset value based on the number of days from the beginning of the month. Also for simplicity it treats every month as if it had 32 days. So the sunrise/sunset time ends up being a bit off, but I find it quite serviceable, even in February when there's the most offset error. BAJ -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics