Harold Hallikainen wrote: >>> BANKSEL TRISD >>> movlw 0x00 >>> movwf PORTA >>> movwf PORTB >>> movwf PORTC >>> movwf PORTD > > So, I think those first movwf port > instructions were actually attempts to clear TRIS. Wow, that would be *really* bad programming. I was giving him a little mor= e credit than that and thought the BANKSEL TRISD was meant to be to a port register, and that he was trying to set the I/O pins to 0 which he later se= t to 1. Since on this PIC the bank setting doesn't matter when accessing por= t registers, it was time to mention that after he got the LED to blink. Of course the comments should clear up the intent. Seeing as this guy didn't bother with that either I'm starting to think you're right and the code is really that irresponsible. I guess we've found a new low. Not jus= t missing comments but deliberate obfuscation. "I want to set the TRIS registers, but that would be too obvious. I know, I'll set the bank right, but reference a register at the same offset in another bank. That'll keep em guessing, ha ha." Serves him right this broke on a PIC 18. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .