Actually, here's a real easy way to get a fresh seed for your Random function every time you power up... no description... see if you can figure it...
RandomSeed var Byte
PIC powers up and runs this ditty...
Read 0,RandomSeed
RandomSeed=RandomSeed+23 ' best with any ODD number here
Write 0,RandomSeed
RandomSeed now contains a fresh seed every time you power up... three lines of code replaces your NE555 and a heap of headaches.
Since the EEPROM has only got a lifespan of around 100,000 writes... let me see that means your product should die sometime after 270 years - I trust the warranty would have exprired by then...
Melanie
Bookmarks