At 20:11 3/09/97 -0400, you wrote: >is it possible to write some code that will generate a set of random numbers? >I would like to randomly turn ON and OFF portb outputs on a 16C84. Hello, I've found that the RAM content of the 16c84 is somehow ramdom at start-up, so xor-ing the 36 values you can get a seed, then you can use a rutine like this one: ; random rutine: it get a random seed in SEED1 and ; store another random number also in SEED1 RANDOM rlf SEED1,W rlf SEED1,W btfsc SEED1,4 xorlw 1 btfsc SEED1,5 xorlw 1 btfsc SEED1,3 xorlw 1 movwf SEED1 return Regards, Adolfo. ----------------------------------------------------------------------- | Adolfo Cobo Garcia - UNIVERSIDAD DE CANTABRIA | | E.T.S.I.I. y Telecomunicacion, Grupo de Ingenieria Fotonica | | Avda. Los Castros s/n E-39005 Santander SPAIN | | Tfno. +34-42-201539 Fax +34-42-201873 Email: acobo@teisa.unican.es | -----------------------------------------------------------------------