Forums

USART electrical specifications information request

Started by Chris May 2, 2005
Does anybody have information about the TX pin in particular. I'm
using a 16F628 to listen to a gps module's 1Hz data packet, strip out
the time information alone and then retransmit it at a slower baud
rate over a short range radio link. It works, but I'm aware that if I
wish to expand the system and tie another device to the pics TX pin
things could go awry in the elctrical sense.

I've tested the voltage of the TX pin with just a 1K pullup attached
and it sits at about 2.5V, dropping to zero when data '0' is being
transmitted.

Now, what should I expect to see on the TX pin ?, do I need a
pullup ? should I isolate all data lines when attaching more than one
through it's own buffer transistor. I'm sure I can get the code
working, it already works with two devices, but I'm having no luck in
finding specific electrical specs and information about the idling
condition of usart pins.

If anyone can help me find the information I would appreciate it very
much.

Chris Barron




The datasheet Figure 18-18 shows Voh vs Ioh over temperature.
Section 17.2 lists two specs for all output pins (other than RA4 -
which has a different spec) - look for D080 and D090.

The TX pin is no different than any other CMOS output. It is not
open collector and doesn't need pull-up.

--- In piclist@picl..., "Chris" <fixitsan@a...> wrote:
> Does anybody have information about the TX pin in particular. I'm
> using a 16F628 to listen to a gps module's 1Hz data packet, strip
out
> the time information alone and then retransmit it at a slower
baud
> rate over a short range radio link. It works, but I'm aware that
if I
> wish to expand the system and tie another device to the pics TX
pin
> things could go awry in the elctrical sense.
>
> I've tested the voltage of the TX pin with just a 1K pullup
attached
> and it sits at about 2.5V, dropping to zero when data '0' is being
> transmitted.
>
> Now, what should I expect to see on the TX pin ?, do I need a
> pullup ? should I isolate all data lines when attaching more than
one
> through it's own buffer transistor. I'm sure I can get the code
> working, it already works with two devices, but I'm having no luck
in
> finding specific electrical specs and information about the idling
> condition of usart pins.
>
> If anyone can help me find the information I would appreciate it
very
> much.
>
> Chris Barron



--- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
>
> The datasheet Figure 18-18 shows Voh vs Ioh over temperature.
> Section 17.2 lists two specs for all output pins (other than RA4 -
> which has a different spec) - look for D080 and D090.
>
> The TX pin is no different than any other CMOS output. It is not
> open collector and doesn't need pull-up.
>


Thanks, I've found that also.

But it seems that the Usart needs to work in accordance with the NRZ
protocol inasmuch as the line will idle in a high condition.
If I don't connect the tx pin to anything at all, but have it idling
as the usart tx pin I get 5V output from it. Based on the datasheet
information it is the standard 25ma sink/source rule which applies.

The reason for my question was that I have a chip in a circuit here
which outputs only about 2.5V from the tx pin even though it isn't
loaded too much. so it looks like I have another problem with this
chip, i needed the confirmation, thanks

Chris



--- In piclist@picl..., "Chris" <fixitsan@a...> wrote:
> --- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
> >
> > The datasheet Figure 18-18 shows Voh vs Ioh over temperature.
> > Section 17.2 lists two specs for all output pins (other than
RA4 -
> > which has a different spec) - look for D080 and D090.
> >
> > The TX pin is no different than any other CMOS output. It is
not
> > open collector and doesn't need pull-up.
> > Thanks, I've found that also.
>
> But it seems that the Usart needs to work in accordance with the
NRZ
> protocol inasmuch as the line will idle in a high condition.
> If I don't connect the tx pin to anything at all, but have it
idling
> as the usart tx pin I get 5V output from it. Based on the
datasheet
> information it is the standard 25ma sink/source rule which applies.

There is no such rule; it is urban legend! The MAXIMUM a pin can
source or sink is 25 mA just before the smoke leaks out of the
chip. Over a reasonable temperature range, while maintaining
rasonable logic levels, a pin can sink 8.5 mA (spec D080) but only
source 3.0 mA (spec D090). Those are the values I would design
around although I might look at the Voh vs Ioh graph if I needed a
little more source current.

>
> The reason for my question was that I have a chip in a circuit
here
> which outputs only about 2.5V from the tx pin even though it isn't
> loaded too much. so it looks like I have another problem with this
> chip, i needed the confirmation, thanks

If you are only getting 2.5V, I would look again at the circuit and
the graph. While these parameters are not tested prior to shipping,
I would expect them to be met by design.

3 mA source current isn't very much - you can't even use a 1K
resistor feeding the base of a transistor and and maintain Vcc-0.7V
output.

And, of course, the lower the logic 1 output voltage, the more
voltage that is dropped internally and the more heat the chip has to
deal with.

>
> Chris



--- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
If I don't connect the tx pin to anything at all, but have it
> idling
> > as the usart tx pin I get 5V output from it. Based on the
> datasheet
> > information it is the standard 25ma sink/source rule which
applies.
>
> There is no such rule; it is urban legend! The MAXIMUM a pin can
> source or sink is 25 mA just before the smoke leaks out of the
> chip. Over a reasonable temperature range, while maintaining
> rasonable logic levels, a pin can sink 8.5 mA (spec D080) but only
> source 3.0 mA (spec D090). Those are the values I would design
> around although I might look at the Voh vs Ioh graph if I needed a
> little more source current.

Okay, I compliment Maxim on their ability to make smoke-tight seals.
Through admittedly poor design I once had a pic in a circuit driving
15 leds, one each leg with 20mA (measured) of drive current. >
> >
> > The reason for my question was that I have a chip in a circuit
> here
> > which outputs only about 2.5V from the tx pin even though it
isn't
> > loaded too much. so it looks like I have another problem with
this
> > chip, i needed the confirmation, thanks
>
> If you are only getting 2.5V, I would look again at the circuit and
> the graph. While these parameters are not tested prior to
shipping,
> I would expect them to be met by design.
>

By 'loaded too much' I was meaning not loaded at all....2.5V no
load...something's wrong. Swapped it for another chip and it's 5V
now. The burnt out max232 further up the line seems to have shorted

Thanks for the tip



--- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
> --- In piclist@picl..., "Chris" <fixitsan@a...> wrote:
> > --- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
> > >
> > > The datasheet Figure 18-18 shows Voh vs Ioh over temperature.
> > > Section 17.2 lists two specs for all output pins (other than
> RA4 -
> > > which has a different spec) - look for D080 and D090.
> > >
Based on the
> datasheet
> > information it is the standard 25ma sink/source rule which
applies.
>
> There is no such rule; it is urban legend! The MAXIMUM a pin can
> source or sink is 25 mA just before the smoke leaks out of the
> chip. Over a reasonable temperature range, while maintaining
> rasonable logic levels, a pin can sink 8.5 mA (spec D080) but only
> source 3.0 mA (spec D090). Those are the values I would design
> around although I might look at the Voh vs Ioh graph if I needed a
> little more source current.

Yes in the worse possible example where you have every pin sourcing
or sinking those values hold true. From what i can make out they're
listed in such a way that there can be no come back on microchip for
anyone who reads the maximum power dissipation value (800mW for a
16f628) and decides it would be okay to put it all into one pin
instead of distributing it around the ports.

Those figures in D080 and D090 can easily be recalculated to meet
individual requirements as the number of pins asssigned to sinking
and sourcing varies. As long as the pin explicit maximums are not
exceeded, and collectively you don't have one port sourcing the
maximum limit you're safe enough to exceed the 'operating condition'
values without fear of damage.

I'm not disputing what you're saying, just that it only applies to
the worst case scenario, the 'normal' sink figure applies only when
every pin which can sink is sinking current, and the same for pins
sourcing current.

It's Microchip's play it safe strategy to list specs in such a way,
but I'm sure they tell us what the maximums are for a very good
reason.

ChrisB




> I'm not disputing what you're saying, just that it only applies to
> the worst case scenario, the 'normal' sink figure applies only
when
> every pin which can sink is sinking current, and the same for pins
> sourcing current.
>
> It's Microchip's play it safe strategy to list specs in such a
way,
> but I'm sure they tell us what the maximums are for a very good
> reason.
>
> ChrisB

I don't think I agree. What is supposed to happen with datasheets
is that the more detailed data indicates test conditions where
inputs and outputs are guaranteed.

In a lot of cases, such as driving LEDs, the actualy output voltage
doesn't matter very much. If the smoke stays inside, everything is
fine. When driving other logic circuits, the output voltage matters
a great deal as does rise time.

For the most part I haven't hung a lot of logic around the outside
of a PIC. Like most, I drive a couple of LEDs, a MAX233 and maybe a
couple of 754410s - robotics projects, mostly. Since these logic
devices don't represent much of a load, I haven't worried about the
specs.

But, every once in a while, you get caught! Were I designing some
discrete circuit around a PIC, I would pay a lot more attention to
D080 and D090. To my way of thinking, those are the design points.

Richard


--- In piclist@picl..., "rtstofer" <rstofer@p...> wrote:
>
> > I'm not disputing what you're saying, just that it only applies
to
> > the worst case scenario, the 'normal' sink figure applies only
> when
> > every pin which can sink is sinking current, and the same for
pins
> > sourcing current.
> >
> > It's Microchip's play it safe strategy to list specs in such a
> way,
> > but I'm sure they tell us what the maximums are for a very good
> > reason.
> >
> > ChrisB
>
> I don't think I agree. What is supposed to happen with datasheets
> is that the more detailed data indicates test conditions where
> inputs and outputs are guaranteed.
>
> In a lot of cases, such as driving LEDs, the actualy output voltage
> doesn't matter very much. If the smoke stays inside, everything is
> fine. When driving other logic circuits, the output voltage
matters
> a great deal as does rise time.
>
> For the most part I haven't hung a lot of logic around the outside
> of a PIC. Like most, I drive a couple of LEDs, a MAX233 and maybe
a
> couple of 754410s - robotics projects, mostly. Since these logic
> devices don't represent much of a load, I haven't worried about the
> specs.
>
> But, every once in a while, you get caught! Were I designing some
> discrete circuit around a PIC, I would pay a lot more attention to
> D080 and D090. To my way of thinking, those are the design points.
>
> Richard

I wasn't disputing anything you had said, it's all good advice.
I was clarifying that the details in datasheets don't always serve
the same purpose.

Like the top speed of a car, why do they bother to list it when the
power output is over 120BHP, knowing that any 100BHP car can exceed
every speed limit.

I just wanted to 'open it up' as opposed to narrowing it down. The
problems come when you have to attach a device which let's it's smoke
out at 15mA and you've only assumed that your pic outputs 3mA, it's
not going to work for long !

Chris