Dominic Stratten wrote : > Ben - apart from setting PORTB:3 as an output, I cant see > anywhere in your code where you're setting the ports as > inputs or outputs. The RB3 is the only pin used that can be set to *either* input or output. RE3 is an input by default when disabling MCLR, there isn't even a TRISE register at all. RB0-RB4 are analog inputs as defualt, that might be a problem... Second thought, I'm pretty sure it is :-) RB0-RB4 can be set to digital I/O either by manipulating the config rgister for the ADC module, or by setting a CONFIG bit so they are digital I/O on POR (nice feature, b.t.w) ! And, of course, all this is clearly described in a specific greyed "Note-box" on the page desribing the PORT B (page 104). One thought could be to read the docs... :-) Jan-Erik. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.