Thanks Andy! I'm trying the code you sent. But I have a few question. > Or, if you prefer, you can use this routine (written by Marv > Isaacman) instead: > > MARV: MOVLW 01DH > CLRC > RLF RANDOM > SKPNC > XORWF RANDOM > RETLW 0 "CLRC", "SKPNC" I think about CLRC that C flag clear. About SKPNC, if C flag is 0, then next is skipped. Is it wrong? I have never used the macro. If you introduce me how to write these macro, I will be a better PICer!! Regards. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shuji Hashimoto Laboratory. Waseda.Univ.Dept.of.Applied Physics. Keishiro Tabe tab@shalab.phys.waseda.ac.jp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~