> > what is better, > > Better is utilizing an actual hardware peripheral to > accomplish the task. If you need I2C, then use the I2C > module. Or PWM. Or a USART. I'd want to add some nuances to that. If you have known good bit-bang code for something that is not too time-critical it is often a much better idea to use that code than to start using the hardware. This is more often the case for protocols where you are the master (mastre I2C, master SPI, UART send) than for protocols where you are the slave (slave I2C, SPI, UART receive). The hardware peripherals are not always exactly the same in all PICs, but bit-bang code is almost always fully portable. I more or less copied my Jal I2C code to C18 and to GCC for ARM. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist