Just some things to watch out for, when you get complacient with using PICs 18F2520 has analog pins on PORTB. Make sure you disable this in the configuration if you want to use it for digital...AND....setting ADCON1 for digital I/O. Both need to be done. That one caught me for a little while when PORTB wan't working correctly. --------------------------------- Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist