Hi I have a problem, because I donŽt know C- language !!! I wanŽt to know how this C code works (it sends byte trough the parallel port to my Ti calculator, the link only has 3 wires and one is GND ). I want to translate it to PIC, so I can interface my Ti with the PIC Anything would help, just a few comnents and IŽll try to figure out the rest Thanks for you time Javier /* * Sends a byte to the calculator */ int put92(char data) { int bit; for (bit=0; bit<8; bit++) { if (bit==1) tx(1); if (data&1) { outportb(lpt_out, 2); while (inportb(lpt_in)&0x10); outportb(lpt_out, 3); while ((inportb(lpt_in)&0x10)==0x00); } else { outportb(lpt_out, 1); while (inportb(lpt_in)&0x20); outportb(lpt_out, 3); while ((inportb(lpt_in)&0x20)==0x00); } data>>=1; // may need 10us delay here } } /* * Reads a byte from the calculator */ unsigned char get92(void) { int bit; unsigned char data=0, v; for (bit=0; bit<8; bit++) { while ((v=inportb(lpt_in)&0x30) == 0x30); if (v==0x10) { data=(data>>1)|0x80; outportb(lpt_out, 1); while ((inportb(lpt_in)&0x20)==0x00); outportb(lpt_out, 3); } else { data=data>>1; outportb(lpt_out, 2); while ((inportb(lpt_in)&0x10)==0x00); outportb(lpt_out, 3); } // may need 10us delay here } return data; }