PDA

View Full Version : useful signal voltages for USART?



- 19th October 2007, 15:38
hi,

I'm making use of serial interupts with the USART, and basing this on code found here:
http://www.melabs.com/resources/samples/x1/pbp/serbufx.bas

This has worked fine for me before, but now I have a different application. Incoming serial is at 57600 baud, with a default high of 3v dropping low during transmission. I'm not sure how low though! I'm assuming 0v - and though I don't have an osciliscope I see a dip in voltage on a mutlimeter happening where I would expect it to happen.

My problem is that it's not low enough to trigger the hardware interrupt, let alone make any sense the incoming bytes. To test this, I put aside the USART routine, and created a loop looking for LOW on the PIN receiveing the incoming serial, it did not ever register LOW.

So, can anyone help with this, and suggest what I might do to this signal to read the bytes?

bests,
Tobie

Bruce
- 19th October 2007, 16:52
Look in the Electrical Specifications section of the datasheet for the PIC you're using.

If the USART RX pin is an ST Schmitt Trigger type, it's going to require signal levels
somewhere from ground to 0.2 * Vdd for a logic low, and 0.8 * Vdd to Vdd for a logic
1 level input.

If your external device operates at 3V, and can't provide these logic level signals, you
may need some kind of level shifting like a small signal transistor or FET between the
two. Or just select a PIC that can operate from a 3V supply.

Here's a nice Microchip app note with tips & tricks for 3.3V interfacing;
http://www.microchip.com/stellent/groups/techpub_sg/documents/devicedoc/en026368.pdf

Look at Figure 6-1 for a very simple 3.3V to 5V MOSFET translator. For non-inverting, just
move the resistor/PIC input to the source side VS drain side.

- 14th November 2007, 07:27
Thanks for that Bruce, there is some useful detail in the document you pointed me to.

I finally bought a USB oscilloscope, and low and behold the 3v IC is not actually sending any serial - so that solves that!