Chuck Hellebuyck wrote: > I believe your problem is the following line: > RND=TMR0 > > You declare RND as a word (16bits) and then try to fill it with TMR0 > which is a byte (8bits). I believe the programs hangs up waiting for > the other 8 bits then resets via the watchdog. Try using TMR1. It's > 16 bits. I don't know anything about this Basic compiler (and don't want to), but it would have to be a very crappy compiler to not know how to assign an 8 bit value into a 16 bit value. Then again, there are a lot of crappy compilers out there, especially for tiny systems... ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- 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