On Sun, 20 Oct 2002 22:50:59 +0200, Francois Robbertze wrote: >I use the following code to assign the prescaler to TMR0 in a PIC16F628 as well as a PIC16F873. The help file states that this option is not recomended for PIC 16CXX devices. > >movlw b'00000100' ;assign prescaler to TMR0 >OPTION > >It works fine, but MPLAB gives me the following warning: > >Warning[224] C:\MYDOCU~1\CID\CID2\MPLAB\CID2.ASM 251 : Use of this instruction is not recommended. > >What is the right way to do this or can I ignore this warning? > The OPTION instruction (like the TRIS instructions) may or may not be implemented in future Microchip processors. It's best to avoid using them. The way to do this 'properly' is to write your value with a movwf OPTION_REG instruction. [Note: In the 16 series processors, OPTION_REG appears in register bank 1 (and 3).] IMHO, it's not generally a good idea to disable or ignore warnings. They can sometimes give you a valuable clue to questionable portions of your code. While I may be considered a bit paranoid about them, I try to always have my code compile/assemble with no warnings at all. I find it a lot easier to avoid them entirely than to figure out which ones are safe to ignore and which ones aren't. Regards, Bob -- 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