siong wrote: > Recently I am trying to write a simple program using 17c44. I tried > to use portc as my input and portd as my output. > .... > when I look at the watch window, the w register is not working. > .... Does anyone knows the problem? > > Below is my main program:- > > LOOP MOVPF PORTC,0 > MOVWF PORTD > GOTO LOOP Siong: The 17C4x's instruction set and architecture is very different from the 16Cxx's... The "MOVPF" instruction's second operand is a file register, not simply a "0" or "1". To make your program work, change it as follows: WREG EQU 0x0A ;Register 0x0A is the W-Register. LOOP MOVPF PORTC,WREG MOVWF PORTD GOTO LOOP -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499