Hi Mike, Here is a link (with code) that might be of use to you: http://random.mat.sbg.ac.at/generators/ Good luck with your project! mcb At 03:17 PM 03/09/2000 +0000, Mike W wrote: >Hello All, > >I'm just starting on my first PIC project ( its starting life as a random >morse code generator ) and I could use a routine to produce a >random number between 0 and 45 decimal to use as a lookup >variable. > >I have some example code written in Cvasm/Parallax assembler to >do something like this but I'm not competent to successfully translate >this code to MPASM with any confidence. > >I'm using MPASM because whatever assembler I eventually use I'll >need a good understanding of MPASM to debug native code so I'd >better learn MPASM syntax first. > >At present I'm using the timer to trip an interrupt every 1/500th >second which toggles porta.0 to produce the tone on a piezo >sounder if a flag is set, and not if reset. so the timer is being used, >but perhaps it could be used as a seed > > Anyway, if you can help it would be appreciated. I brew a really >mean Bitter Ale.( approx 14%pv ) > >Thanks... Mike W mike@corn2.freeserve.co.uk > ------------------------------------------------------------------- Matt Burch | Pinnacle Technology | tel: (785) 832-8866 Project Engineer | 619 E. 8th St. Suite D | fax: (785) 749-9214 mburch@pinnaclet.com | Lawrence, KS 66044 | www.pinnaclet.com -------------------------------------------------------------------