SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Philba
#8546
I'm interfacing a CP210x USB/USART (or FT232R) to a PIC16F877A. I need to run the PIC at 5V and the datasheet says the TX and RX lines of the PIC are schmitt triggered with min Vh of 4V. It looks to me that this won't work with 3.3V logic.

I think I can just use a +5V pull-up on the PIC inputs but that has implications on max speed. I've not been able to find any info on this topic. I'd prefer not to use a logic shifter chip. If that's the case, then I'll probably use the FT232R since that seems to work better with 5V cmos logic levels. Anyone been there? what did you do?

I noticed that SFE breakout (for the cp2103, basically the same chip in this regard) doesn't do anything with the serial I/O lines. Am I worrying about a non-issue?

Phil
By Philba
#8593
nobody, huh?

I did find a fairchild tiny logic TTL level OR gate (basically an HCT) in a SOT23 package that could translate the levels. Not my perfect solution but not a total killer. I probably will switch to the FT232R.
User avatar
By sparky
#8787
Almost all the PIC interfacing I've done was from a 3.3V device transmitting into a PIC running at 5V (GPS to PIC, Cellular to PIC, BT to PIC). The PIC's minimum logic high (yea, read it twice) is usually 2V. So anything breaking 2V is considered a logic '1' by a PIC. I don't have time to find the datasheet page at the moment, but let's compare notes. What page are you getting your 4V level from? I'll find my info as well.

-Nathan
By Philba
#8796
sparky wrote:Almost all the PIC interfacing I've done was from a 3.3V device transmitting into a PIC running at 5V (GPS to PIC, Cellular to PIC, BT to PIC). The PIC's minimum logic high (yea, read it twice) is usually 2V. So anything breaking 2V is considered a logic '1' by a PIC. I don't have time to find the datasheet page at the moment, but let's compare notes. What page are you getting your 4V level from? I'll find my info as well.

-Nathan
I dunno, I just read the data sheets and occasionally believe them... For TTL level inputs, you are correct. However, when you throw a schmitt trigger into the mix it doesn't look pretty. Most PIC pins are TTL but certain ones are schmitt triggered

The 16F877/876 datasheet (both A and non-A) show the RX pin being schmitt triggered - at least that's how I read the circuit diagram on p 46 of the 87xA datasheet (DS39582B). It shows all input for pins RC[7:5] going through the schmitt trigger. RC7 is RX. The electrical section, P 178, says that min Input High Voltage for schmitt trigger buffer is .8Vdd (4V when Vdd is 5V).

The 16F628A datasheet shows RX (RB1) explicitly going through a schmitt trigger. (p37 of the 16F627A/628A/648A datasheet). Again, .8Vdd min Input High V.

Some pics seem to not have scmittt trigger input for RX. For example the 16F88 port circuit diagram on page 61 shows a schmitt trigger on RX (RB2) but the pin function table on P58 says that matters only for SPI and I2C. So, by implication, it *seems* to say the F88 uses TTL triggering (2V min Input High V)

Phil