Can a pic drive a 5 volt relay directly without a transistor switch?
Current (from or to) an output pin will move that pin voltage away from 5 V (if a source) or 0 V (if it's a sink). If you look at section 17.4 it shows this: -



If you are sinking a current of (say) 8 mA then you will drop a maximum of 0.6 volts. So, with 5 outputs each contributing 8 mA you might see a voltage across the relay coil of about 4.4 volts instead of 5 volts.

Given that the relay needs 70% of 5 volts at ambient temperatures this should work but, watch the maximum dissipation because 40 mA x 0.6 volts is 24 mW lost and if you are planning on driving a few relays this become problematic. Also keep an eye on the peak current into Vdd and 0V pins - this can also be a limiting factor.

Don't forget the diode!



It's also worth mentioning that with only 4.4 volts applied, the current through the relay will be smaller than 40 mA so, given that there are a few ifs and buts, you might see in excess of 4.6 volts but there's no guarantee you'll see above 4.4 volts unless you can find a graph of IO current in the data sheet that gives more detail.