P-Channel devices are usually more expensive and have other design considerations, so I design 99% of the time with N-channel and have several devices rolling around my parts bin when I need one. It's 6 of one, a half dozen of the other. You might be able to save a little power by using one or the other, since a comms channel is usually idle a lot - I have not had a design where I needed to care about power and also needed a cheap comms interface, so I really have not thought it through.
About the protection of PIC input pin lets go remember that generally input pins already have positive and negative clamp diodes built in the chip. I have tested even without a series resistor but 470R will do the job. The great majority of legacy RS232 ports already are 0- 5v compatible for input and are current limited for output.
Here's a good example of the strange things that can happen when you get creative and choose not to pay attention to the specs...
PIC16F1847 HFINTOSC Slow and Unstable
Note that this guy WAS limiting the current with a series resistor.
Back to my original question:
Turns out that the 12F1xxx family (and likely others) have an option to invert data from the TX/CK pin. The control is the SCKP bit (bit 4) in the BAUDCON register, described on page 279 of the 12F1822 data sheet.
Last edited by swr999; - 23rd October 2014 at 21:34.
Bookmarks