According to http://www.meder.com/dip-relay_uk0.html this relay uses a 12VDC coil [ 12 ma ]. This means you will want drive the relay using a buffer between the PIC and the relay. You have many , many choices. Here are two. #1 You can use a 2N7000 FET to buffer the PIC from the relay. Drive the gate of the FET from a pin from PORTA. Use the FET to sink current from the relay coil. #2 Use a 2N3904 transistor to buffer the PIC from the relay. Drive the base of the 3904 using a 10K resistor. Tie the emitter to ground and use the collector to sink current from the relay. Some choices that will influence your design...... 1) How fast must the relay activate and deactivate ? 2) What is the relay controlling ? [ voltage , current and complex impedance ? ] 3) Where is power for the relay coil derived from ? I can send you a schematic if you wish one. Gus > > On Dec 28, 2009, at 1:50 PM, Paul Chany wrote: > > Hi, > > I'm new to PIC programming. > I want to connect the DIP12-1A72-12L relay to PIC16F877A > microcontrollers PORTA port. > How can I do that? > > Any advices will be appreciated! > > -- > Regards, Paul Chany > http://csanyi-pal.info > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist