Quote Originally Posted by Melanie
RelayPinA var PortB.0
RelayPinB var PortB.7

' Example Toggles Relay One Second ON/OFF
' Don't forget the Back-emf Diode across the coil
' otherwise you'll damage the PIC

Loop:
TRISB.0=1
TRISB.7=1
Pause 1000
HIGH RelayPinA
HIGH RelayPinB
Pause 1000
Goto Loop
Hi, Mel

May be I'm a bit asleep ...but how does that achieve toggling an output ???

woudn'it be better to write : PORTB = PORTB ^ %10000001 , to have simultaneous toggling on B.0 and B.7 ?

Alain, back to sleep