Jan-Erik, sorry - I meant to write from: www.golovchenko.org/cgi-bin/delay this site has a delay generator. I haven't tested the generated code yet I will do this tonight let you know if it was working or not. Now, as for application: I try to simulate irish lighthouses for a decorative map. Each lighthouse is represented by a LED on the map. Each lighthouse has a different flashing sequence for example the Kish Lighthouse, east of Dublin Bay, has a character of Fl (2) W 20s, this according to chart means 0.4 second of light, followed by 3.6 seconds eclipse, followed by another 0.4 seconds of light and 15.6 seconds eclipse. This sequence is repeated every 20 seconds (fl 0.4, ec 3.6, fl 0.4, ec 15.6 = 20s.) and the next lighthouse "Tory Island" is Fl (4) W 30s (fl 0.2, ec 4.8, fl 0.2, ec 4.8, fl 0.2, ec 4.8, fl 0.2, ec 14.8 = 30s). and so on..... The flashes are either 0.2, 0.4, 0.5 or 1s. Sofar I found 21 delay routine that are common amongst 20 lighthouses. Yes I suppose there is a common time base but I thought of 21 delay routine first!I thought that was the more suitable (easier!)option I will spare you the hardware setup just that I bought a PIC16877 because that is the one that I can Program. thanks >From: Jan-Erik Soderholm >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] code question >Date: Wed, 25 Aug 2004 20:58:06 +0200 > >Aslam Jallali wrote : > > > Hello to you > > Using the delay generator from > >"form" ?? > > > I have generated 21 different delay routines. (I need these > > for different LED flash sequences).... > >I think that we can stop here... > >Now, do you realy need all those delay routines ? >What are the actual delay times that you need ? >Do they have some common "time base", such as >1, 10 or 100 ms, and all delays are integer multiples >of this "time base" ? > >I think that you should set up one timer to provide the >"time base". Let the timer-overflow-interrupt call a routine >that decrements 21 "delay-counters", and whenever >anyone of them gets to zero, do something. > >If you provide a little more information about what this application >is supposed to do, it will be easier to tell *how* to do it... :-) > >Jan-Erik. > >-- >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 _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- 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