Searching \ for 'basic question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/language/index.htm?key=basic
Search entire site for: 'basic question'.

Truncated match.
PICList Thread
'basic question'
1999\04\06@103922 by Windows-1252?Q?Sebasti=E1n_Dols?=

flavicon
face
Well, pretty simple question. I've read about the pullups in a PIC in this
list, even something that explains the pullup resistors as a elastic gum.
But the problem is that I don't understand the utility of the pullups and
for what and when are useful. Could someone of yours explain me the basic
uses and advantadges of the pullups in a PIC?

thanks in advance.

1999\04\06@113201 by jamesp

picon face
A pullup 'PULLS' a signal to the Positive supply rail keeping
it in a known state of LOGIC HIGH until it is driven low by
some means.  The means may be the chip itself or it could be
an external signal to the chip.   The point is, the PULLUP
keeps that pin in a known and stable state until it is changed on purpose.
This is done to prevent a pin from changing on
it's own from an unrelated or unconnected signal to that pin.  For instance,
you have a gate package that has 4 gates in it.  Three are used, but the forth
is extra.  If you don't use a pullup on the input of the unused gate, it's outpu
t
could attempt to follow one of the other used gates as it is switching.  This
causes the power dissipated by the package to go up.  Also, you don't want this
extra gate switching anyway.  Therefore, pullup the input to Vdd through a resis
tor
(ie 10K for instance), to prevent this.  The sympathy drive from an adjacent
signal will not have enough ooomph to overcome the 10K
pullup current, but it can be (overcome) driven by a legit logic signal.  This
is kind of a long winded explanation, but I tried
to speak it in a way that you could easily understand what I'm talking about.
BTW, the same thing goes for a PULLDOWN resistor, except that now you have
to source current rather than sink it, and the pin is in a known and stable
logic low state.


Did I acheive success?   Hope this helps.

                                Regards,

                                  Jim





>Well, pretty simple question. I've read about the pullups in a PIC in this

>list, even something that explains the pullup resistors as a elastic gum.
>But the problem is that I don't understand the utility of the pullups and
>for what and when are useful. Could someone of yours explain me the basic
>uses and advantadges of the pullups in a PIC?
>
>thanks in advance.
>

1999\04\06@114829 by engelec

picon face
> Well, pretty simple question. I've read about the pullups in a PIC in this
> list, even something that explains the pullup resistors as a elastic gum.
> But the problem is that I don't understand the utility of the pullups and
> for what and when are useful. Could someone of yours explain me the basic
> uses and advantadges of the pullups in a PIC?
>

sure.for any input you have to have two states LOW and HIGH   0/1
in order to determine low or high states you need to have pull
up or pull down resister. that is how you can explain in software
what to do IF your input is low or high.
example .imagine you have one state what will happen

       btfss    PORTB,0    ; if low turn green led on if high redone on
       bsf      PROTB,1    ; turn red led on
       bsf      PORTB,2    ; turn green led on

if you connect your switch without pull up or pull down
you will have unreliable design and it is not going to work.
this is the most basic way I can explain.
let me know if you need more explanation.


Andre Abelian


> thanks in advance.

1999\04\06@162720 by MEDICINTEKNIK KB

picon face
Just a bit of warning about the "open collector output" - such as the RA4 on the 16C74A.
This is not - until  now - a true open collector output. It will actually draw current, if the voltage is about 1 Volt over the supply. If it would have been a true open collector, one would expect a Vce-max of maybe 20 - 40Volts or so; but that just doesn't work. With the new 18Cxx-series, though, if I am correctly informed, this should be OK.

Let me guess - not EVERYBODY have noticed... (?)

P.S. The datasheet reads "...open collector type..." D.S.


Sven
-----Ursprungligt meddelande-----
Från: Sebastián Dols <spam_OUTsdolsTakeThisOuTspamESEGI.ES>
Till: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU <PICLISTspamKILLspamMITVMA.MIT.EDU>
Datum: den 6 april 1999 16:39
Ämne: basic question


>Well, pretty simple question. I've read about the pullups in a PIC in this
>list, even something that explains the pullup resistors as a elastic gum.
>But the problem is that I don't understand the utility of the pullups and
>for what and when are useful. Could someone of yours explain me the basic
>uses and advantadges of the pullups in a PIC?
>
>thanks in advance.
>

1999\04\07@041117 by Windows-1252?Q?Sebasti=E1n_Dols?=

flavicon
face
>> Could someone of yours explain me the basic uses and advantadges of the
pullups in a PIC?
>
>sure.for any input you have to have two states LOW and HIGH   0/1 in order
to determine low or high states >you need to have pull up or pull down
resister. that is how you can explain in software what to do IF your input
>is low or high. Example .imagine you have one state what will happen
>
>        btfss    PORTB,0    ; if low turn green led on if high redone on
>        bsf      PROTB,1    ; turn red led on
>        bsf      PORTB,2    ; turn green led on
>
>if you connect your switch without pull up or pull down you will have
unreliable design and it is not going to >work.this is the most basic way I
can explain. let me know if you need more explanation.
>
>Andre Abelian
>
>> thanks in advance.

Lot of thanks Andre, I will reply to the piclist to receive all the possible
info. About the pullups, OK, I understand that, and I use them this way, but
my question was more.. ehm..'pic-oriented'. Maybe the rigth question is:

Can I assume that if I set the portb internal pullups via code, and I drive
any portb pin with a 'below-5v-but-above-2v' signal, the pullup will 'raise'
the signal to 'full-5V', and this will improve my signal adquisition? If
this is correct, I understand PIC pullups. If this is wrong.. I am confused
yet.

Thanks in advance.. again  :)

Keep on PICing

Sebastian

1999\04\07@063104 by Caisson

flavicon
face
> Van: Sebastián Dols <.....sdolsKILLspamspam.....ESEGI.ES>
> Aan: EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU
> Onderwerp: basic question
> Datum: dinsdag 6 april 1999 16:37
>
> Well, pretty simple question. I've read about the pullups in a PIC in
this
> list, even something that explains the pullup resistors as a elastic gum.
> But the problem is that I don't understand the utility of the pullups and
> for what and when are useful. Could someone of yours explain me the basic
> uses and advantadges of the pullups in a PIC?

The simplest answer I could think of was this one :

1) a line should never be in a un-defined state.
2) a line that is in a un-defined state should be forced in a
defined-state.

Solutions:

A) Connect the above line to either VCC or GND. Dis-allowing any other
source to manipulate the line. (the source will short-circuit to either VCC
or GND)
B) Connect the above line to either VCC or GND using a resistor. This way
an other source can pull the line any way it want's, when it takes the
increased current (thru the resistor) into count.  If the source is _not_
applied (three-stated for example) the line is still in a defined state.

A resistor connected to VCC is mostly called a Pull-Up,  if connected to
GND it's sometimes reffered to as a Pull-Down.

Greetz,
 Rudy Wieser

1999\04\07@063727 by Johann Geir Jonsson

flavicon
face
>Well, pretty simple question. I've read about the pullups in a PIC in this
>list, even something that explains the pullup resistors as a elastic gum.
>But the problem is that I don't understand the utility of the pullups and
>for what and when are useful. Could someone of yours explain me the basic
>uses and advantadges of the pullups in a PIC?
>
>thanks in advance.

I think the elastic explanation was quite good (Wagner Lipnharski; subject:
"Re: Err, this is SO confusing =(").
I had a problem using a NO pushbutton which shorted an input pin to the
ground without using a pull-up resistor.

Input pin ---------NOPB---------GND

When the pushbutton was (normally) open, the input pin wasn4t connected to
anything.  It had little resistance to interference and was jumping randomly
between HIGH and LOW causing interrupts every time.

When i added a pull-up the input pin was pulled to Vdd while the PB was
open, but when the PB closed the input pin was pulled to ground (causing an
interrupt) and when it opened again the pin was again pulled to Vdd (also
causing an interrupt).

Pin-------NOPB-------GND
 |
 |
Pull-up-----Vdd

Hope this helps,
Johann Geir Jonsson

PS.  Instead of the pull-up resistor, I could have used the PIC internal
weak pull-ups (I think; I haven't used them yet).

1999\04\07@143247 by Roland Andrag

flavicon
face
Sebastian wrote:


>>> Could someone of yours explain me the basic uses and advantadges of the
>pullups in a PIC?

<snip>

>Can I assume that if I set the portb internal pullups via code, and I drive
>any portb pin with a 'below-5v-but-above-2v' signal, the pullup will
'raise'
>the signal to 'full-5V', and this will improve my signal adquisition? If
>this is correct, I understand PIC pullups. If this is wrong.. I am confused
>yet.


No, that is not the use of a pullup, to put it bluntly.  A pullup is used to
give a floating pin a state - either high (pullup), or low (pulldown).  In
pics it is normally used in one of the following two cases:

0 V ----- switch ----- pic port b input pin ------ internal pullup ---- 5 V

In this case, when the switch (button of a keypad etc.) is open, the pullup
raises the pin's level to 5 V (no current is flowing through the switch, and
very small current is flowing into the pin (very high input impedance), so
the pin is sitting at 5 V since only a very small voltage is dropped across
the pullup).  Without the pullup the pin would have a random state - it
would be floating, and often ends up following other pins in its vicinity.
When the switch is closed, current flows from 5 V through the pullup to 0 V,
dropping 5 V across the pullup and leaving the pin at 0 V. The second case
is used with the open collector output on pin Ra4 (I think its Ra4):

some device ------ Ra4 ----- external pullup ---- 5 V

In this case when Ra4 is low, 'some device' reads low since current flows
from 5 V through pullup into Ra4, dropping 5 V across the pullup.  When Ra4
is high, it is actually in a high impedance mode (not connected to anything)
since it is an open collecter output.  An open collector can only sink
current, it cannot source current (current can only flow into the pin, not
out of the pin).  In this case the current is sourced through the pullup,
and the input impedance of 'some device' has to be high enough so that the
current flowing through the pullup doesn't cause a large voltage to be
dropped across it. Next time the question 'Ra4 doing funny things - tried 5
pics' comes up, you should know what the author forgot to do.

I hope thats clear
Roland

1999\04\07@154753 by Windows-1252?Q?Sebasti=E1n_Dols?=

flavicon
face
Thanks a lot to all of yours, and specially Roland Andrag for this message.
And I had a bonus, the explanation of a 'open collector' is (joke) a
'collector item' :)

Well, if someone of the picsters come to Madrid during the year or to
Mallorca (only in summer..) has a paid coffee cup. General prize for all.
And this is no joke ;)


Thanks again
>Sebastian wrote:
>
>
>>>> Could someone of yours explain me the basic uses and advantadges of the
>>pullups in a PIC?
>
><snip>
>
>>Can I assume that if I set the portb internal pullups via code, and I
drive
>>any portb pin with a 'below-5v-but-above-2v' signal, the pullup will
>'raise'
>>the signal to 'full-5V', and this will improve my signal adquisition? If
>>this is correct, I understand PIC pullups. If this is wrong.. I am
confused
>>yet.
>
>
>No, that is not the use of a pullup, to put it bluntly.  A pullup is used
to
>give a floating pin a state - either high (pullup), or low (pulldown).  In
>pics it is normally used in one of the following two cases:
>
>0 V ----- switch ----- pic port b input pin ------ internal pullup ---- 5 V
>
>In this case, when the switch (button of a keypad etc.) is open, the pullup
>raises the pin's level to 5 V (no current is flowing through the switch,
and
>very small current is flowing into the pin (very high input impedance), so
>the pin is sitting at 5 V since only a very small voltage is dropped across
>the pullup).  Without the pullup the pin would have a random state - it
>would be floating, and often ends up following other pins in its vicinity.
>When the switch is closed, current flows from 5 V through the pullup to 0
V,
>dropping 5 V across the pullup and leaving the pin at 0 V. The second case
>is used with the open collector output on pin Ra4 (I think its Ra4):
>
>some device ------ Ra4 ----- external pullup ---- 5 V
>
>In this case when Ra4 is low, 'some device' reads low since current flows
>from 5 V through pullup into Ra4, dropping 5 V across the pullup.  When Ra4
>is high, it is actually in a high impedance mode (not connected to
anything)
{Quote hidden}

1999\04\07@175822 by paulb

flavicon
face
Sebasti‡n Dols wrote:

> Can I assume that if I set the portb internal pullups via code, and I
> drive any portb pin with a 'below-5v-but-above-2v' signal, the pullup
> will 'raise' the signal to 'full-5V', and this will improve my signal
> adquisition?

 This could almost be true!  "Good old" TTL defined a logic "1" as
2.5V, so the totem-pole output did a good job of pulling a "1" to 2.5 or
3.5V, but didn't manage to pull it much higher.

 If you wanted to interface this to CMOS where the logic *threshold*
was in fact 2.5V, it wasn't so reliable and could be a little slow.  The
two solutions were to use 74HC logic where the input thresholds were
distorted to match TTL, or to pull up all TTL outputs to 5V with a
suitable resistor, which the TTL totem-pole (OR open collector) could
readily pull low.

 This is of not so much relevance to the PIC pull-ups which equate to
something like 50 or 100k, while the proper speed-up/ pullup for TTL
was more like 4.7k.
--
 Cheers,
       Paul B.

1999\04\07@180648 by Ryan Pogge

flavicon
face
how about beer?
i am going to be in spain this summer...


> Thanks a lot to all of yours, and specially Roland Andrag
for this message.
> And I had a bonus, the explanation of a 'open collector'
is (joke) a
> 'collector item' :)
>
> Well, if someone of the picsters come to Madrid during the
year or to
> Mallorca (only in summer..) has a paid coffee cup. General
prize for all.
> And this is no joke ;)
>
>
> Thanks again
> >Sebastian wrote:
> >
> >
> >>>> Could someone of yours explain me the basic uses and
advantadges of the
> >>pullups in a PIC?
> >
> ><snip>
> >
> >>Can I assume that if I set the portb internal pullups
via code, and I
> drive
> >>any portb pin with a 'below-5v-but-above-2v' signal, the
pullup will
> >'raise'
> >>the signal to 'full-5V', and this will improve my signal
adquisition? If
> >>this is correct, I understand PIC pullups. If this is
wrong.. I am
> confused
> >>yet.
> >
> >
> >No, that is not the use of a pullup, to put it bluntly.
A pullup is used
> to
> >give a floating pin a state - either high (pullup), or
low (pulldown).  In
> >pics it is normally used in one of the following two
cases:
> >
> >0 V ----- switch ----- pic port b input pin ------
internal pullup ---- 5 V
> >
> >In this case, when the switch (button of a keypad etc.)
is open, the pullup
> >raises the pin's level to 5 V (no current is flowing
through the switch,
> and
> >very small current is flowing into the pin (very high
input impedance), so
> >the pin is sitting at 5 V since only a very small voltage
is dropped across
> >the pullup).  Without the pullup the pin would have a
random state - it
> >would be floating, and often ends up following other pins
in its vicinity.
> >When the switch is closed, current flows from 5 V through
the pullup to 0
> V,
> >dropping 5 V across the pullup and leaving the pin at 0
V. The second case
> >is used with the open collector output on pin Ra4 (I
think its Ra4):
> >
> >some device ------ Ra4 ----- external pullup ---- 5 V
> >
> >In this case when Ra4 is low, 'some device' reads low
since current flows
> >from 5 V through pullup into Ra4, dropping 5 V across the
pullup.  When Ra4
> >is high, it is actually in a high impedance mode (not
connected to
> anything)
> >since it is an open collecter output.  An open collector
can only sink
> >current, it cannot source current (current can only flow
into the pin, not
> >out of the pin).  In this case the current is sourced
through the pullup,
> >and the input impedance of 'some device' has to be high
enough so that the
> >current flowing through the pullup doesn't cause a large
voltage to be
> >dropped across it. Next time the question 'Ra4 doing
funny things - tried 5
> >pics' comes up, you should know what the author forgot to
do.
> >
> >I hope thats clear
> >Roland
> >
>

1999\04\08@065220 by Windows-1252?Q?Sebasti=E1n_Dols?=

flavicon
face
no problem :)


>how about beer?
>i am going to be in spain this summer...
>

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...