Hi Antonio, Looking at your Pseudo-Random Generator, there is an easier way to do this in software. It produces an equivalently random stream of bits. Its called the "Galois" Configuration where the bits are manipulated like: // define our mask for bits 0, 1, 2, 4, 6 and 31 #define MASK 0x80000057 int Clock_LFSR() { // if we are going to output a 1, we need to xor the mask into // the register to do the feedback. if( ShiftRegister & 0x00000001 ) { // XOR the feedback taps into the register and shift in a 1 ShiftRegister = ((ShiftRegister ^ MASK) >> 1) | 0x80000000; return 1; // output 1 } else { ShiftRegister >>= 1; // shift in a 0 return 0; } } It will run a bit quicker because you don't need to extract all the individual bits and you can use any maximal feedback polynomial you want. And you can extend this to any size shift register (I have a large list of polynomials to use that goes up to a 9690 bit register :) it can be found in "Applied Cryptography" by Schneier, page 376). --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Antonio L Benci > Sent: Tuesday, 16 October 2001 9:53 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Random Noise 16C84 > > > The attached file presents code for a pseudo-random noise generator > using a PIC16C84. > > David Expssito Corral wrote: > > > > Hello, > > > > I have to do a Ramdon noise generator with PIC 16C84 using MPLAB to > > programme the microcontroller. > > > > Where do I can find the one random noise program? > > > > David > > > > _________________________________________________________________ > > Descargue GRATUITAMENTE MSN Explorer en > http://explorer.msn.es/intl.asp > > > > -- > > 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 > > Nino. > -- > ------------------------------------------------------ > | Antonio (Nino) L. Benci | > | Professional Officer, Electronic Services | > | School of Physics & Materials Engineering | > | Monash University | > | email: nino.benci@spme.monash.edu | > | T: 61 3 9905 3649. F: 61 3 9905 3637 | > | M: 0414 924 833 | > ------------------------------------------------------ > > -- 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