Thanks to everyone who replied, I really appreciate the input. Special thanks to Tim who emailed me off list as I now have a working device! A real nice Xmas present for me! In the end I threw out the idea of using timer0 and the Basic 'Random' command and followed Tim's advice of using a double nested loop in the 'Main' loop to produce a 0-1 count and a 1-31 count. These numbers are then used in a delay loop and an 'A or B' decision line to come up with the desired result. It works perfectly and the timing is easily adjusted via the multiplication factor in the subroutine loop. Oh boy am I now a happy guy as I had worked hard at this considering it was my first electronics project in many years and my first with a programmable chip. I just have to get it off the breadboard and into a box now and it will be ready for field trials. Thanks again and all the best for whatever festival you follow at this time of year. Larry -- 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