Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | Pullup questions

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

Pullup questions - Vic Fraenckel - Jan 17 7:42:00 2005


I am designing my first PIC board. It will use a 16f876. I will use two
PORTA pins and the USART pins RC6 and RC7 for serial comms. The board will
be expanded later to use either I2C or SPI. The questions I have are:

1. Should ALL I/O pins be pulled up to +5V or should ONLY the unused I/O
pins be pulled up? I have been told that ALL I/O pins should be pulled up
with 10k.

2. What power value should the pullups be. I am planning on 1/4 watt.

3. Can I use SMT resistors/arrays?

Any enlightenment will be appreciated.

TIA

Vic
________________________________________________________

Victor Fraenckel - The Windman
victorf ATSIGN windreader DOTcom
KC2GUI

Home of the WindReader Electronic Theodolite
Read the WIND

"Victory at all costs, victory in spite of all terror, victory however long
and hard the road may be; for without victory there is no survival."
- Winston [Leonard Spencer] Churchill (1874 - 1965)

"Dost thou not know, my son, with how little wisdom the world is governed?"
-Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus

"People sleep peacefully in their beds at night only because rough
men stand ready to do violence on their behalf."
-George Orwell






(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - Vasile Surducan - Jan 17 9:29:00 2005


--- In , "Vic Fraenckel" <victorf@w...> wrote:
> I am designing my first PIC board. It will use a 16f876. I will
use two
> PORTA pins and the USART pins RC6 and RC7 for serial comms. The
board will
> be expanded later to use either I2C or SPI. The questions I have
are:
>
> 1. Should ALL I/O pins be pulled up to +5V or should ONLY the
unused I/O
> pins be pulled up? I have been told that ALL I/O pins should be
pulled up
> with 10k.

stupidity... think a little what Ohm's law say. When you have
inputs which must active low, yes you've pulling them up. But when
you have outputs active low or active high, who the hell is
requiring pullups ? Have an oped drain output ? Yes, pull it up.

Or never think and do what other people are saying. >
> 2. What power value should the pullups be. I am planning on 1/4
watt.

And is to difficult for you to compute the resistor values ?
0.125W is often ok for the poor PIC >
> 3. Can I use SMT resistors/arrays? if you live in US yes, else is forbidden !

:)
Vasile
http://surducan.netfirms.com





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - Kees Stenekes - Jan 17 9:47:00 2005

Vic,

No need to pull-up all the IO-pins. They have internal
pullups that you can configure, and besides, you can
allways define the unused pins to be output, so no
pullups are needed.
If you insist, yes 10k is a good value, and since
there will be no more than 25mA running thrue them,
1/5 watt resistors will do fine.

Kees

--- Vic Fraenckel <> wrote:

> I am designing my first PIC board. It will use a
> 16f876. I will use two
> PORTA pins and the USART pins RC6 and RC7 for serial
> comms. The board will
> be expanded later to use either I2C or SPI. The
> questions I have are:
>
> 1. Should ALL I/O pins be pulled up to +5V or should
> ONLY the unused I/O
> pins be pulled up? I have been told that ALL I/O
> pins should be pulled up
> with 10k.
>
> 2. What power value should the pullups be. I am
> planning on 1/4 watt.
>
> 3. Can I use SMT resistors/arrays?
>
> Any enlightenment will be appreciated.
>
> TIA
>
> Vic
>
________________________________________________________
>
> Victor Fraenckel - The Windman
> victorf ATSIGN windreader DOTcom
> KC2GUI
>
> Home of the WindReader Electronic Theodolite
> Read the WIND
>
> "Victory at all costs, victory in spite of all
> terror, victory however long
> and hard the road may be; for without victory there
> is no survival."
> - Winston [Leonard Spencer] Churchill (1874 - 1965)
>
> "Dost thou not know, my son, with how little wisdom
> the world is governed?"
> -Count Oxenstierna (ca 1620) to the young King
> Gustavus Adolphus
>
> "People sleep peacefully in their beds at night only
> because rough
> men stand ready to do violence on their behalf."
> -George Orwell __________________________________





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: Pullup questions - HangGlider - Jan 17 12:19:00 2005

You know Vasily, you're a real ass. Vic was asking a couple of
sensible questions, and prefaced his remarks by saying this was his
first PIC board. I'll bet you didn't know ohms law when you were born
- you learned it sometime just like the rest of us. Vic is trying to
learn something. You're response was rude, and insensitive. Apologize
or go away.

Arlen Fletcher

On Jan 17, 2005, at 6:29 AM, Vasile Surducan wrote: >
> --- In , "Vic Fraenckel" <victorf@w...> wrote:
>> I am designing my first PIC board. It will use a 16f876. I will
> use two
>> PORTA pins and the USART pins RC6 and RC7 for serial comms. The
> board will
>> be expanded later to use either I2C or SPI. The questions I have
> are:
>>
>> 1. Should ALL I/O pins be pulled up to +5V or should ONLY the
> unused I/O
>> pins be pulled up? I have been told that ALL I/O pins should be
> pulled up
>> with 10k.
>
> stupidity... think a little what Ohm's law say. When you have
> inputs which must active low, yes you've pulling them up. But when
> you have outputs active low or active high, who the hell is
> requiring pullups ? Have an oped drain output ? Yes, pull it up.
>
> Or never think and do what other people are saying. >>
>> 2. What power value should the pullups be. I am planning on 1/4
> watt.
>
> And is to difficult for you to compute the resistor values ?
> 0.125W is often ok for the poor PIC >>
>> 3. Can I use SMT resistors/arrays?
>>
>
> if you live in US yes, else is forbidden !
>
> :)
> Vasile
> http://surducan.netfirms.com >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - ydexter - Jan 17 12:52:00 2005



> > 3. Can I use SMT resistors/arrays?
> >
>
> if you live in US yes, else is forbidden !
>
> :)
> Vasile
> http://surducan.netfirms.com

Is this a joke or what ?





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: Pullup questions - Chad Russel - Jan 17 13:09:00 2005

I do not think one uncalled for remark deserves another. People have
bad days.

Maybe two apologies, then lets forget it?

Chad

--- HangGlider <> wrote:

> You know Vasily, you're a real ass. Vic was asking a couple of
> sensible questions, and prefaced his remarks by saying this was his
> first PIC board. I'll bet you didn't know ohms law when you were
> born
> - you learned it sometime just like the rest of us. Vic is trying to
>
> learn something. You're response was rude, and insensitive.
> Apologize
> or go away.
>
> Arlen Fletcher
>
> On Jan 17, 2005, at 6:29 AM, Vasile Surducan wrote:
>
> >
> >
> > --- In , "Vic Fraenckel" <victorf@w...>
> wrote:
> >> I am designing my first PIC board. It will use a 16f876. I will
> > use two
> >> PORTA pins and the USART pins RC6 and RC7 for serial comms. The
> > board will
> >> be expanded later to use either I2C or SPI. The questions I have
> > are:
> >>
> >> 1. Should ALL I/O pins be pulled up to +5V or should ONLY the
> > unused I/O
> >> pins be pulled up? I have been told that ALL I/O pins should be
> > pulled up
> >> with 10k.
> >
> > stupidity... think a little what Ohm's law say. When you have
> > inputs which must active low, yes you've pulling them up. But when
> > you have outputs active low or active high, who the hell is
> > requiring pullups ? Have an oped drain output ? Yes, pull it up.
> >
> > Or never think and do what other people are saying.
> >
> >
> >>
> >> 2. What power value should the pullups be. I am planning on 1/4
> > watt.
> >
> > And is to difficult for you to compute the resistor values ?
> > 0.125W is often ok for the poor PIC
> >
> >
> >>
> >> 3. Can I use SMT resistors/arrays?
> >>
> >
> > if you live in US yes, else is forbidden !
> >
> > :)
> > Vasile
> > http://surducan.netfirms.com
> >
> >
> >
> >
> >
> >
> >
> > to unsubscribe, go to http://www.yahoogroups.com and follow the
> > instructions
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>

=====
My software has no bugs, only undocumented features.
__________________________________






(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - Phil - Jan 17 13:34:00 2005


--- In , Chad Russel <chadrussel@y...> wrote:
> I do not think one uncalled for remark deserves another. People have
> bad days.
>
> Maybe two apologies, then lets forget it?
>
> Chad

maybe everyone should go away! seriously, he did put a smiley at the
end. Perhaps people should just relax a little.

On the point V raised, one should think about Ohms Law when asking
about resistor sizing. He said it harshly but there was some truth
his response. 5/10K is a pretty small number, 5 times that is still
small and just about any resistor size will work. I would have
prefered that he teach rather than chide, though.

I have taught college level courses and it was always amazing to me
how many people asked questions that, had they thought about it for a
sub-second duration, they could have easily answered themselves. My
response was always a leading question. The ones that got the clue
were good students, the ones that didn't usually switched majors. By
the end of the semester, the good ones had learned to engage brain
before opening mouth.

Phil





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: Pullup questions - HangGlider - Jan 17 14:12:00 2005

Ok - I apologize to the list for calling Vasili an ass. I won't
apologize for calling his response rude and insensitive. Smiley face
or not, you don't call someone stupid for asking a question - I don't
care what the setting is - it's not a good way to promote learning.

Arlen Fletcher

On Jan 17, 2005, at 10:09 AM, Chad Russel wrote: > I do not think one uncalled for remark deserves another. People have
> bad days.
>
> Maybe two apologies, then lets forget it?
>
> Chad
>
> --- HangGlider <> wrote:
>
>> You know Vasily, you're a real ass. Vic was asking a couple of
>> sensible questions, and prefaced his remarks by saying this was his
>> first PIC board. I'll bet you didn't know ohms law when you were
>> born
>> - you learned it sometime just like the rest of us. Vic is trying to
>>
>> learn something. You're response was rude, and insensitive.
>> Apologize
>> or go away.
>>
>> Arlen Fletcher
>>
>> On Jan 17, 2005, at 6:29 AM, Vasile Surducan wrote:
>>
>>>
>>>
>>> --- In , "Vic Fraenckel" <victorf@w...>
>> wrote:
>>>> I am designing my first PIC board. It will use a 16f876. I will
>>> use two
>>>> PORTA pins and the USART pins RC6 and RC7 for serial comms. The
>>> board will
>>>> be expanded later to use either I2C or SPI. The questions I have
>>> are:
>>>>
>>>> 1. Should ALL I/O pins be pulled up to +5V or should ONLY the
>>> unused I/O
>>>> pins be pulled up? I have been told that ALL I/O pins should be
>>> pulled up
>>>> with 10k.
>>>
>>> stupidity... think a little what Ohm's law say. When you have
>>> inputs which must active low, yes you've pulling them up. But when
>>> you have outputs active low or active high, who the hell is
>>> requiring pullups ? Have an oped drain output ? Yes, pull it up.
>>>
>>> Or never think and do what other people are saying.
>>>
>>>
>>>>
>>>> 2. What power value should the pullups be. I am planning on 1/4
>>> watt.
>>>
>>> And is to difficult for you to compute the resistor values ?
>>> 0.125W is often ok for the poor PIC
>>>
>>>
>>>>
>>>> 3. Can I use SMT resistors/arrays?
>>>>
>>>
>>> if you live in US yes, else is forbidden !
>>>
>>> :)
>>> Vasile
>>> http://surducan.netfirms.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> to unsubscribe, go to http://www.yahoogroups.com and follow the
>>> instructions
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
> > =====
> My software has no bugs, only undocumented features. >
> __________________________________ > to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - rtstofer - Jan 17 14:16:00 2005



Do you need pullups? Well, if you intend to feed an input pin with
a logic signal, then no. Pullups are not required.

On the other hand, if you intend to feed the input with a mechanical
switch, some form of pullup is required. Only PORTB has weak
pullups (very weak!) internal which can be turned on or off. PORTA
& PORTC do not have internal pullups so you should provide them.
There is a POSSIBILITY that the circuit will work without the pullup
but don't count on it.

As to the value of the pullup: there is no input leakage current to
speak of (1 microamp) so selecting a value guaranteed to provide a
logic 1 is not important (not true with TTL). So the issue is to
select a value that will flow enough current through the mechanical
switch to guarantee conduction. 10K may be too much and 4.7K is
more typical and for big ugly switches, 1K may be necessary. From a
power dissipation point of view, until the pin is actually used as
an input and the input is low, no current flows so it doesn't matter
that the resistor is a smaller value.

The maximum voltage across the resistor is 5V (assuming Vcc=5V) so
for 10k the wattage (E*E/R) is (5 * 5) / 10000 or 0.0025 watts. You
can't buy a resistor that small! 2.5 milliwatts! Even if you went
to 4.7k the value would be 5.3 milliwatts. Any resistor network you
can find will be adequate. You'd need a hundred resistors in
parallel to get to 1/4 watt!

Suppose you wire those resistors in place and then want to use the
pin for output. Well, a 4.7k resistor will add about 1 mA of
current and the limit on the pins is 25 mA so we're already using 4%
of the capability. Who cares?

Since you don't have your plans firmed up, pull all the inputs to
Vcc with an individual 4.7k resistor. If you want to get fancy, put
a parallel row header in place and use shunts to decide whether the
resistor is in or out of the circuit but it really is overkill.

--- In , "Vic Fraenckel" <victorf@w...> wrote:
> I am designing my first PIC board. It will use a 16f876. I will
use two
> PORTA pins and the USART pins RC6 and RC7 for serial comms. The
board will
> be expanded later to use either I2C or SPI. The questions I have
are:
>
> 1. Should ALL I/O pins be pulled up to +5V or should ONLY the
unused I/O
> pins be pulled up? I have been told that ALL I/O pins should be
pulled up
> with 10k.
>
> 2. What power value should the pullups be. I am planning on 1/4
watt.
>
> 3. Can I use SMT resistors/arrays?
>
> Any enlightenment will be appreciated.
>
> TIA
>
> Vic
> ________________________________________________________
>
> Victor Fraenckel - The Windman
> victorf ATSIGN windreader DOTcom
> KC2GUI
>
> Home of the WindReader Electronic Theodolite
> Read the WIND
>
> "Victory at all costs, victory in spite of all terror, victory
however long
> and hard the road may be; for without victory there is no
survival."
> - Winston [Leonard Spencer] Churchill (1874 - 1965)
>
> "Dost thou not know, my son, with how little wisdom the world is
governed?"
> -Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus
>
> "People sleep peacefully in their beds at night only because rough
> men stand ready to do violence on their behalf."
> -George Orwell





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: Re: Pullup questions - Wouter van Ooijen - Jan 17 17:22:00 2005

> Ok - I apologize to the list for calling Vasili an ass. I won't
> apologize for calling his response rude and insensitive. Smiley face
> or not, you don't call someone stupid for asking a question - I don't
> care what the setting is - it's not a good way to promote learning.

Don't be too sure. Sometimes someone should be called a stupid asshole
for asking a dumb question, just to aim his mind in the right direction. And don't forget
- Vasile is not a native english speaker
- he did give a (good!) answer

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Re: Pullup questions - HangGlider - Jan 17 17:45:00 2005

This is my last post on this topic. [A collective sigh of relief goes
up from the crowd].

Others here have answered Vic's question without being condescending
and rude. There's no reason Vasili couldn't have done the same.

Wouter, have you ever known your approach to promote learning? I lived
in Holland for awhile and was comfortable with the directness of the
Dutch people, but I rarely found them to be rude, or to call someone
stupid because they didn't know something.

A previous post referred to the Socratic method of teaching. I applaud
that approach and encourage others to consider using it when responding
to questions that seem elementary.

Finally, I apologize once again for calling Vasili names - that was
inappropriate. I'm glad Vic's question has been answered, and I don't
intend to post again on this topic.

Arlen Fletcher

On Jan 17, 2005, at 2:22 PM, Wouter van Ooijen wrote: >> Ok - I apologize to the list for calling Vasili an ass. I won't
>> apologize for calling his response rude and insensitive. Smiley face
>> or not, you don't call someone stupid for asking a question - I don't
>> care what the setting is - it's not a good way to promote learning.
>
> Don't be too sure. Sometimes someone should be called a stupid asshole
> for asking a dumb question, just to aim his mind in the right
> direction. > And don't forget
> - Vasile is not a native english speaker
> - he did give a (good!) answer
>
> Wouter van Ooijen
>
> -- -------------------------------------------
> Van Ooijen Technische Informatica: www.voti.nl
> consultancy, development, PICmicro products
> docent Hogeschool van Utrecht: www.voti.nl/hvu >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: Re: Pullup questions - Wouter van Ooijen - Jan 18 1:58:00 2005

> Wouter, have you ever known your approach to promote
> learning?

Yes, but of course used rarely. The problem with email is that it can
not convey intonation. When I call someone dumb I use it to empahsise
'you can easily answer this question yourself, you have all the
information'.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - Vasile Surducan - Jan 19 9:37:00 2005


--- In , HangGlider <hangglider@d...> wrote:
> Ok - I apologize to the list for calling Vasili an ass. I won't
> apologize for calling his response rude and insensitive. My dear friend,
I'm not a native english writer as you aren't a native english
reader, else I don't see how you've got this conclusion.

"Stupidity" it's a word with some different understandings for you
and me. You have understood that the asker of this question is
stupid. I didn't say that and if you aren't quite sure please read
again my previous post. The question itself was a stupid one, not
the asker which could be a clever software guy. So please ask him
apologizes.

About the asses, there are many indeed.
:)

A resistor (for pull-up purposes or not) is completely defined by:
- it's value
- it's dissipated power
- maximum voltage across the terminals
- non-resistive parasitical character (mostly inductive)

For an external pull-up resistor connected to a PIC IO, the nominal
voltage and the inductivity does not count, first because the PIC
supply voltage is small and second because the frequency at any IO
PIC (except oscillator IO pins) is also small. Maximum resistor's
value may be computed just by knowing Ohm's low and the magnitude of
the PIC input leackage current (for IO pin used as inputs) and by
requested sourced current for the open drain output.

For unused outputs, using a pull-up or a pull-down resistors it's a
stupidity.

<please read carefully my friend what I've written, before replying
injuries in Shakespeare's language>

The resistor's power results as a simple computation between the
voltage across the resistor and the current flow through the
resistor, multiplied by a safetly factor which is smaller (1) for
smalest computed power and bigger with the power increase (3 to 10).

The story with the internal pull-ups it's a different one. The
internal pullup have a variable value which depends by the PIC
supply voltage value.

When someone is asking what kind of resistors to choose for one
application he must think first what will be the purpose of that
application. Use SMD if will be mass production (automatically
soldered), use standard through holes resistors when will be
prototyping or homebrewed project or small series, use resistor
arrays when PCB space is limited, etc.

But THINK what do you plan to do and do not listen others opinions
just because they exist.

That's the story with asses, english writers and english readers,
and of course stupidity...
:)

best regards,
Vasile
http://surducan.netfirms.com





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: Pullup questions - ydexter - Jan 20 9:30:00 2005


I don't know what that guy wanted to call you, but after that
technical introduction i will call Vasile an ace. --- In , "Vasile Surducan" <vasile@s...> wrote:
>
> --- In , HangGlider <hangglider@d...> wrote:
> > Ok - I apologize to the list for calling Vasili an ass. I won't
> > apologize for calling his response rude and insensitive. > My dear friend,
> I'm not a native english writer as you aren't a native english
> reader, else I don't see how you've got this conclusion.
>
> "Stupidity" it's a word with some different understandings for you
> and me. You have understood that the asker of this question is
> stupid. I didn't say that and if you aren't quite sure please read
> again my previous post. The question itself was a stupid one, not
> the asker which could be a clever software guy. So please ask him
> apologizes.
>
> About the asses, there are many indeed.
> :)
>
> A resistor (for pull-up purposes or not) is completely defined by:
> - it's value
> - it's dissipated power
> - maximum voltage across the terminals
> - non-resistive parasitical character (mostly inductive)
>
> For an external pull-up resistor connected to a PIC IO, the nominal
> voltage and the inductivity does not count, first because the PIC
> supply voltage is small and second because the frequency at any IO
> PIC (except oscillator IO pins) is also small. Maximum resistor's
> value may be computed just by knowing Ohm's low and the magnitude of
> the PIC input leackage current (for IO pin used as inputs) and by
> requested sourced current for the open drain output.
>
> For unused outputs, using a pull-up or a pull-down resistors it's a
> stupidity.
>
> <please read carefully my friend what I've written, before replying
> injuries in Shakespeare's language>
>
> The resistor's power results as a simple computation between the
> voltage across the resistor and the current flow through the
> resistor, multiplied by a safetly factor which is smaller (1) for
> smalest computed power and bigger with the power increase (3 to 10).
>
> The story with the internal pull-ups it's a different one. The
> internal pullup have a variable value which depends by the PIC
> supply voltage value.
>
> When someone is asking what kind of resistors to choose for one
> application he must think first what will be the purpose of that
> application. Use SMD if will be mass production (automatically
> soldered), use standard through holes resistors when will be
> prototyping or homebrewed project or small series, use resistor
> arrays when PCB space is limited, etc.
>
> But THINK what do you plan to do and do not listen others opinions
> just because they exist.
>
> That's the story with asses, english writers and english readers,
> and of course stupidity...
> :)
>
> best regards,
> Vasile
> http://surducan.netfirms.com





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )