What kind of I/O do you want? If it's simple I/O: PIC has many I/O pins witch are in groups called PORTs, each PORT commonly have 8 I/O pins, eg PORTB. First of all, you have to tell the PIC if the pin will be an input or a output, so if you want that 18F452's pin 33 become an output pin, write in assembly: BCF TRISB,0 if you want to pin 34 be a input pin: BSF TRISB,1 That is because TRISB is "input/output control" of PORTB, and "TRISB,0" refers to RB0 pin and "TRISB,1" to RB1. Finaly, to put a bit 1 or 0 in the output do that: BSF PORTB,0 ; to make pin 33 = 5V or BCF PORTB,0 ; to make pin 33 = 0V To read a bit: MOVF PORTB,W ; so W register will receive the PORTB value. Hope I could help, God bless you all, Jonnathan Partamian -------Mensagem original------- De: pic microcontroller discussion list Data: Sexta-feira, 07 de Margo de 2003 10:50:03 Para: PICLIST@MITVMA.MIT.EDU Assunto: [PIC]: Need good tutorial on I/O Could someone recommend a really good, basic tutorial for a beginner on the in's and out's of doing I/O with a PIC? I found a really good one by Jim Brown that covered a lot of stuff, but didn't get into the I/O. (Preferably for the 18 series, but those seem to be few and far between as yet) Many thanks, John -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu