How is the internal pullup resistor in a microcontroller wired?Pulldown resistor on output pin, how does output still work?Inform microcontroller that the analogue circuit is powered upWhat are the mechanisms at work in a pull-up or pull-down resistor circuits with a push-buttons and a GPIO?How to correctly wire an interrupt pin, clock pin, PWM pin, SPI pinDoes zener diode connected at the input pin of a controller affect the controller when internal pull up is enabled at that pin?Controlling the power supply of a bluetooth module via GPIO and a transistor
What are these ingforms of learning?
What is the meaning of word 'crack' in chapter 33 of A Game of Thrones?
What are these pixel-level discolored specks? How can I fix it?
Can the U.S. president make military decisions without consulting anyone?
Worms crawling under skin
Who created the Lightning Web Component?
Examples of "unsuccessful" theories with afterlives
Which museums have artworks of all four Ninja Turtles' namesakes?
I reverse the source code, you negate the input!
Is it really necessary to have a four hour meeting in Sprint planning?
Wrong result by FindRoot
Cut a cake into 3 equal portions with only a knife
How much damage can be done just by heating matter?
Is it right to extend flaps only in the white arc?
Is it a good idea to leave minor world details to the reader's imagination?
Would Taiwan and China's dispute be solved if Taiwan gave up being the Republic of China?
Way of the bicycle
Is this a Sherman, and if so what model?
Do the villains know Batman has no superpowers?
How to make interviewee comfortable interviewing in lounge chairs
Do we know the situation in Britain before Sealion (summer 1940)?
Writing a letter of recommendation for a mediocre student
Is it more effective to add yeast before or after kneading?
How to manage expenditure when billing cycles and paycheck cycles are not aligned?
How is the internal pullup resistor in a microcontroller wired?
Pulldown resistor on output pin, how does output still work?Inform microcontroller that the analogue circuit is powered upWhat are the mechanisms at work in a pull-up or pull-down resistor circuits with a push-buttons and a GPIO?How to correctly wire an interrupt pin, clock pin, PWM pin, SPI pinDoes zener diode connected at the input pin of a controller affect the controller when internal pull up is enabled at that pin?Controlling the power supply of a bluetooth module via GPIO and a transistor
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I am constructing a circuit where 2 microcontrollers will communicate with a high or low state on their IO pin. Basicly a state pin for Bluetooth connected, or not. One microcontroller will have an IO pin as an output and the other an IO pin as an input. I know my microcontroller has an internal pull up (also pull down) resistor, but how does this circuit look like? Below is how I want to connect it, for sure I shouldn't need to have resistors when there are internal ones, right?
simulate this circuit – Schematic created using CircuitLab
So my real question is how does the internal pull up/down resistors look in the microcontroller? Is it like this?
simulate this circuit
microcontroller resistors
$endgroup$
add a comment
|
$begingroup$
I am constructing a circuit where 2 microcontrollers will communicate with a high or low state on their IO pin. Basicly a state pin for Bluetooth connected, or not. One microcontroller will have an IO pin as an output and the other an IO pin as an input. I know my microcontroller has an internal pull up (also pull down) resistor, but how does this circuit look like? Below is how I want to connect it, for sure I shouldn't need to have resistors when there are internal ones, right?
simulate this circuit – Schematic created using CircuitLab
So my real question is how does the internal pull up/down resistors look in the microcontroller? Is it like this?
simulate this circuit
microcontroller resistors
$endgroup$
2
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
2
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06
add a comment
|
$begingroup$
I am constructing a circuit where 2 microcontrollers will communicate with a high or low state on their IO pin. Basicly a state pin for Bluetooth connected, or not. One microcontroller will have an IO pin as an output and the other an IO pin as an input. I know my microcontroller has an internal pull up (also pull down) resistor, but how does this circuit look like? Below is how I want to connect it, for sure I shouldn't need to have resistors when there are internal ones, right?
simulate this circuit – Schematic created using CircuitLab
So my real question is how does the internal pull up/down resistors look in the microcontroller? Is it like this?
simulate this circuit
microcontroller resistors
$endgroup$
I am constructing a circuit where 2 microcontrollers will communicate with a high or low state on their IO pin. Basicly a state pin for Bluetooth connected, or not. One microcontroller will have an IO pin as an output and the other an IO pin as an input. I know my microcontroller has an internal pull up (also pull down) resistor, but how does this circuit look like? Below is how I want to connect it, for sure I shouldn't need to have resistors when there are internal ones, right?
simulate this circuit – Schematic created using CircuitLab
So my real question is how does the internal pull up/down resistors look in the microcontroller? Is it like this?
simulate this circuit
microcontroller resistors
microcontroller resistors
edited Apr 15 at 14:59
Marius Gulbrandsen
asked Apr 15 at 14:49
Marius GulbrandsenMarius Gulbrandsen
1872 silver badges13 bronze badges
1872 silver badges13 bronze badges
2
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
2
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06
add a comment
|
2
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
2
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06
2
2
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
2
2
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06
add a comment
|
4 Answers
4
active
oldest
votes
$begingroup$
In your example, R1 is a pull-down and R2 is a pull-up resistor. Depending on the MCU and the pin involved there may be one or the other or both or neither available. That information will be in the datasheet. There's also another possibility, a "hold" where there is a resistor internally from a buffer output back to the input.
The purpose of a pull-up or pull-down is to put the input line in a known state if the connection to it is high-impedance. On an MCU that can happen if the wire gets disconnected or if the driver is deliberately tristated or during startup before it is configured. If the line is being driven push-pull it does little but waste power.
Whether a pull-up or pull-down is required is dependent on your requirements. As to whether the internal resistor is sufficient, again that depends on the requirements. The IC makers tend to choose rather high values which may not be desirable in certain circumstances where EMI or leakage is present. There might be cases where the values are too low (very low power systems, for example). The on-chip resistors (or equivalent) also have quite a loose tolerance typically. So there are many cases where a pull-up or pull-down is available on the chip, but the designer chooses to use an external resistor.
$endgroup$
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
add a comment
|
$begingroup$
Pull-ups and pull-downs are usefull for setting the "default" logic level when the input pin may be left unconnected or at a high impedance state. These pull (virtual) resistors can be configured by your code but usually default to being disabled when you do nothing about them.
If you're worried about frying you micro because there are no resistors between the Bluetooth IC output and the micro input to limit current, then don't worry. When set as inputs microcontroller pins have high impedance, which means they draw (almost) no current.
$endgroup$
add a comment
|
$begingroup$
The normal way of doing this is to disable the pullups, at both ends, and drive in both directions.
A feature you may want to add if you're worried about damage and not about signal speed is a series resistor between the two microcontrollers. Size this so that the current flowing if one end drives high and the other drives low is limited to a safe value for both. This is usually about 20ma. That suggests a resistor in the 150-200 Ohm range, although for your purpose you could have any value from 150R - 10k without noticing any adverse effects.
$endgroup$
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
add a comment
|
$begingroup$
Yes. I think you answered the question by your example. But just to be on the safe side-
Pull down/up resistors are supposed to determine the logic level at startup. Pull down will always be connected to the lowest logic level (e.g GND in your case) and pull up to the highest logic level (e.g VCC of the micro-controller in your case)
So they will be connected internally to the GND/VCC ...
$endgroup$
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("schematics", function ()
StackExchange.schematics.init();
);
, "cicuitlab");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "135"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f432661%2fhow-is-the-internal-pullup-resistor-in-a-microcontroller-wired%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
In your example, R1 is a pull-down and R2 is a pull-up resistor. Depending on the MCU and the pin involved there may be one or the other or both or neither available. That information will be in the datasheet. There's also another possibility, a "hold" where there is a resistor internally from a buffer output back to the input.
The purpose of a pull-up or pull-down is to put the input line in a known state if the connection to it is high-impedance. On an MCU that can happen if the wire gets disconnected or if the driver is deliberately tristated or during startup before it is configured. If the line is being driven push-pull it does little but waste power.
Whether a pull-up or pull-down is required is dependent on your requirements. As to whether the internal resistor is sufficient, again that depends on the requirements. The IC makers tend to choose rather high values which may not be desirable in certain circumstances where EMI or leakage is present. There might be cases where the values are too low (very low power systems, for example). The on-chip resistors (or equivalent) also have quite a loose tolerance typically. So there are many cases where a pull-up or pull-down is available on the chip, but the designer chooses to use an external resistor.
$endgroup$
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
add a comment
|
$begingroup$
In your example, R1 is a pull-down and R2 is a pull-up resistor. Depending on the MCU and the pin involved there may be one or the other or both or neither available. That information will be in the datasheet. There's also another possibility, a "hold" where there is a resistor internally from a buffer output back to the input.
The purpose of a pull-up or pull-down is to put the input line in a known state if the connection to it is high-impedance. On an MCU that can happen if the wire gets disconnected or if the driver is deliberately tristated or during startup before it is configured. If the line is being driven push-pull it does little but waste power.
Whether a pull-up or pull-down is required is dependent on your requirements. As to whether the internal resistor is sufficient, again that depends on the requirements. The IC makers tend to choose rather high values which may not be desirable in certain circumstances where EMI or leakage is present. There might be cases where the values are too low (very low power systems, for example). The on-chip resistors (or equivalent) also have quite a loose tolerance typically. So there are many cases where a pull-up or pull-down is available on the chip, but the designer chooses to use an external resistor.
$endgroup$
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
add a comment
|
$begingroup$
In your example, R1 is a pull-down and R2 is a pull-up resistor. Depending on the MCU and the pin involved there may be one or the other or both or neither available. That information will be in the datasheet. There's also another possibility, a "hold" where there is a resistor internally from a buffer output back to the input.
The purpose of a pull-up or pull-down is to put the input line in a known state if the connection to it is high-impedance. On an MCU that can happen if the wire gets disconnected or if the driver is deliberately tristated or during startup before it is configured. If the line is being driven push-pull it does little but waste power.
Whether a pull-up or pull-down is required is dependent on your requirements. As to whether the internal resistor is sufficient, again that depends on the requirements. The IC makers tend to choose rather high values which may not be desirable in certain circumstances where EMI or leakage is present. There might be cases where the values are too low (very low power systems, for example). The on-chip resistors (or equivalent) also have quite a loose tolerance typically. So there are many cases where a pull-up or pull-down is available on the chip, but the designer chooses to use an external resistor.
$endgroup$
In your example, R1 is a pull-down and R2 is a pull-up resistor. Depending on the MCU and the pin involved there may be one or the other or both or neither available. That information will be in the datasheet. There's also another possibility, a "hold" where there is a resistor internally from a buffer output back to the input.
The purpose of a pull-up or pull-down is to put the input line in a known state if the connection to it is high-impedance. On an MCU that can happen if the wire gets disconnected or if the driver is deliberately tristated or during startup before it is configured. If the line is being driven push-pull it does little but waste power.
Whether a pull-up or pull-down is required is dependent on your requirements. As to whether the internal resistor is sufficient, again that depends on the requirements. The IC makers tend to choose rather high values which may not be desirable in certain circumstances where EMI or leakage is present. There might be cases where the values are too low (very low power systems, for example). The on-chip resistors (or equivalent) also have quite a loose tolerance typically. So there are many cases where a pull-up or pull-down is available on the chip, but the designer chooses to use an external resistor.
edited Apr 15 at 15:13
answered Apr 15 at 15:08
Spehro PefhanySpehro Pefhany
224k5 gold badges177 silver badges469 bronze badges
224k5 gold badges177 silver badges469 bronze badges
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
add a comment
|
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
So what I really want to do is read a high and low state but I do have control over both microcontrollers to program the logic, so in that sense I guess pull up/down resistors are not necesarry. Would I be able to supply 3.3v directly to the input of one microcontroller? What I am concerned with it short circuiting it.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:13
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
The input should never exceed the supply voltage of the chip. If the two units are powered from the same source, no problem, but otherwise you might need to add a resistor to prevent damage. It's not a bad idea to have a resistor there anyway, in case you have to make changes, at least at early stages.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:17
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:19
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
The EMI argument in this specific case should rather be about how much current the driving MCU pin will drive and pull resistors shouldn't be necessary unless there's connectors in between the MCUs. Picking an external pull resistor before an internal one rather refers to cases where there signal isn't always driven to a stable voltage (like when the first MCU is still booting up and has not yet configured its pin to be an output).
$endgroup$
– Lundin
Apr 15 at 15:24
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
$begingroup$
@Lundin If the pull-up or pull-down is necessary at all, there is a condition or conditions under which the resistor is responsible for asserting the logic state. The EMI during that state is the concern wrt the resistor value. It might be open-drain or during startup or with cable disconnected or something else altogether.
$endgroup$
– Spehro Pefhany
Apr 15 at 15:27
add a comment
|
$begingroup$
Pull-ups and pull-downs are usefull for setting the "default" logic level when the input pin may be left unconnected or at a high impedance state. These pull (virtual) resistors can be configured by your code but usually default to being disabled when you do nothing about them.
If you're worried about frying you micro because there are no resistors between the Bluetooth IC output and the micro input to limit current, then don't worry. When set as inputs microcontroller pins have high impedance, which means they draw (almost) no current.
$endgroup$
add a comment
|
$begingroup$
Pull-ups and pull-downs are usefull for setting the "default" logic level when the input pin may be left unconnected or at a high impedance state. These pull (virtual) resistors can be configured by your code but usually default to being disabled when you do nothing about them.
If you're worried about frying you micro because there are no resistors between the Bluetooth IC output and the micro input to limit current, then don't worry. When set as inputs microcontroller pins have high impedance, which means they draw (almost) no current.
$endgroup$
add a comment
|
$begingroup$
Pull-ups and pull-downs are usefull for setting the "default" logic level when the input pin may be left unconnected or at a high impedance state. These pull (virtual) resistors can be configured by your code but usually default to being disabled when you do nothing about them.
If you're worried about frying you micro because there are no resistors between the Bluetooth IC output and the micro input to limit current, then don't worry. When set as inputs microcontroller pins have high impedance, which means they draw (almost) no current.
$endgroup$
Pull-ups and pull-downs are usefull for setting the "default" logic level when the input pin may be left unconnected or at a high impedance state. These pull (virtual) resistors can be configured by your code but usually default to being disabled when you do nothing about them.
If you're worried about frying you micro because there are no resistors between the Bluetooth IC output and the micro input to limit current, then don't worry. When set as inputs microcontroller pins have high impedance, which means they draw (almost) no current.
answered Apr 15 at 15:27
RaphaelPRaphaelP
3166 bronze badges
3166 bronze badges
add a comment
|
add a comment
|
$begingroup$
The normal way of doing this is to disable the pullups, at both ends, and drive in both directions.
A feature you may want to add if you're worried about damage and not about signal speed is a series resistor between the two microcontrollers. Size this so that the current flowing if one end drives high and the other drives low is limited to a safe value for both. This is usually about 20ma. That suggests a resistor in the 150-200 Ohm range, although for your purpose you could have any value from 150R - 10k without noticing any adverse effects.
$endgroup$
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
add a comment
|
$begingroup$
The normal way of doing this is to disable the pullups, at both ends, and drive in both directions.
A feature you may want to add if you're worried about damage and not about signal speed is a series resistor between the two microcontrollers. Size this so that the current flowing if one end drives high and the other drives low is limited to a safe value for both. This is usually about 20ma. That suggests a resistor in the 150-200 Ohm range, although for your purpose you could have any value from 150R - 10k without noticing any adverse effects.
$endgroup$
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
add a comment
|
$begingroup$
The normal way of doing this is to disable the pullups, at both ends, and drive in both directions.
A feature you may want to add if you're worried about damage and not about signal speed is a series resistor between the two microcontrollers. Size this so that the current flowing if one end drives high and the other drives low is limited to a safe value for both. This is usually about 20ma. That suggests a resistor in the 150-200 Ohm range, although for your purpose you could have any value from 150R - 10k without noticing any adverse effects.
$endgroup$
The normal way of doing this is to disable the pullups, at both ends, and drive in both directions.
A feature you may want to add if you're worried about damage and not about signal speed is a series resistor between the two microcontrollers. Size this so that the current flowing if one end drives high and the other drives low is limited to a safe value for both. This is usually about 20ma. That suggests a resistor in the 150-200 Ohm range, although for your purpose you could have any value from 150R - 10k without noticing any adverse effects.
answered Apr 15 at 15:38
pjc50pjc50
36.2k3 gold badges49 silver badges92 bronze badges
36.2k3 gold badges49 silver badges92 bronze badges
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
add a comment
|
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
I'm mostly worried about speed but of course I don't want to damage the microcontrollers. They both have 3.3v logic though. When you say drive in both directions, what do you mean by this? Surely one is input and the other output, or are you suggesting them both being configured output and one high, one low?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:42
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
No, only one as an output, but driven high or low depending on value. As opposed to the "open drain" configuration, which is driven low but "pulled" high by the resistor. When you say you are worried about speed, how fast do you need the signal to be?
$endgroup$
– pjc50
Apr 15 at 15:53
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:57
add a comment
|
$begingroup$
Yes. I think you answered the question by your example. But just to be on the safe side-
Pull down/up resistors are supposed to determine the logic level at startup. Pull down will always be connected to the lowest logic level (e.g GND in your case) and pull up to the highest logic level (e.g VCC of the micro-controller in your case)
So they will be connected internally to the GND/VCC ...
$endgroup$
add a comment
|
$begingroup$
Yes. I think you answered the question by your example. But just to be on the safe side-
Pull down/up resistors are supposed to determine the logic level at startup. Pull down will always be connected to the lowest logic level (e.g GND in your case) and pull up to the highest logic level (e.g VCC of the micro-controller in your case)
So they will be connected internally to the GND/VCC ...
$endgroup$
add a comment
|
$begingroup$
Yes. I think you answered the question by your example. But just to be on the safe side-
Pull down/up resistors are supposed to determine the logic level at startup. Pull down will always be connected to the lowest logic level (e.g GND in your case) and pull up to the highest logic level (e.g VCC of the micro-controller in your case)
So they will be connected internally to the GND/VCC ...
$endgroup$
Yes. I think you answered the question by your example. But just to be on the safe side-
Pull down/up resistors are supposed to determine the logic level at startup. Pull down will always be connected to the lowest logic level (e.g GND in your case) and pull up to the highest logic level (e.g VCC of the micro-controller in your case)
So they will be connected internally to the GND/VCC ...
answered Apr 15 at 15:05
Daniel SapirDaniel Sapir
102 bronze badges
102 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Electrical Engineering Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f432661%2fhow-is-the-internal-pullup-resistor-in-a-microcontroller-wired%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
If your output is pulling both high and low i.e. not configured as open drain, you don't need pull-up or pull-down resistors.
$endgroup$
– Phil G
Apr 15 at 14:54
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:00
2
$begingroup$
Typically the internal pulling resistors are actually FETs. In a few cases wired more as current sources than resistors. Such implementation detail is device specific and seemingly not really relevant to your practical question.
$endgroup$
– Chris Stratton
Apr 15 at 15:01
$begingroup$
What I'm concerned with is of course if I can connect my circuit like in my first schematic and how I would do so as to not damage the components. It seemed to me this was reliant on how the internal "resistors" was connected
$endgroup$
– Marius Gulbrandsen
Apr 15 at 15:06