> Do you actually know what it's supposed to do? - It is very generic, > with no comments atm.. It looks like it sets up porta and portb as > all inputs, and then for some reason sets porta and portb all on. > Then it sets bit7 of portb again. Where did you find this? > This is code for a SmartCard - not commented RB4 connect to SDA of memory (24LC16) RB5 connect to SCK of memory RB6 connect to OSC1 of Pic16F84A and Smartcard pad RB7 connect to SmartCard I/O pad RESET connect to SmartCard Reset pad MPLab also dont like the use of this instruction - "Not recomended' I try to get behind the basics for a Hotel Management/Access system. The timing routines (9600 baud) and read/write to memory routines. This code read/save data from the memory chip, and send/receive data from a SmartCard reader/writer The Write/Read routines change the PortB I/O directions as needed. I suspect that the port state is not that "important" at initial startup... Francois -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist