How is the internal pullup resistor in a microcontroller wired? Announcing the arrival of...
Can I worship Krishna to fullfill my material desires?
What happens to sewage if there is no river near by?
How to pronounce "criar"?
Are my PIs rude or am I just being too sensitive?
Should gear shift center itself while in neutral?
What is the longest distance a 13th level monk can jump while attacking on the same turn?
When is phishing education going too far?
Is there a documented rationale why the House Ways and Means chairman can demand tax info?
What is a quick way to find the reverse complement in bash
He is picky about food(,) so he only eats what he likes
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
Do I really need recursive chmod to restrict access to a folder?
Does polymorph use a PC’s CR or its level?
Why did the IBM 650 use bi-quinary?
Why is "Captain Marvel" translated as male in Portugal?
Is it possible to boil a liquid by just mixing many immiscible liquids together?
Area of a 2D convex hull
What causes the vertical black lines in my photo?
Date formating in QGIS expression
How to bypass password on Windows XP account
How to say 'striped' in Latin
What's the purpose of writing one's academic bio in 3rd person?
Black holes as heat sinks
macOS-like app switching in Plasma 5
How is the internal pullup resistor in a microcontroller wired?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Pulldown resistor on output pin, how does output still work?How should I connect four resistors to double the capacity with the same resistor?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 pinConsidering input pin impedance when calculating pull-up resistor valueDoes zener diode connected at the input pin of a controller affect the controller when internal pull up is enabled at that pin?Why is my drain circuit always drawing current, regardless of MOSFET gate state?Can I leave bootstrap pins floating? (Internal pull-up)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$
1
$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
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$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
1 hour ago
$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
56 mins ago
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 1 hour ago
Marius Gulbrandsen
asked 1 hour ago
Marius GulbrandsenMarius Gulbrandsen
769
769
1
$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
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$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
1 hour ago
$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
56 mins ago
add a comment |
1
$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
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$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
1 hour ago
$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
56 mins ago
1
1
$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
1 hour ago
$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
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$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
1 hour ago
$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
1 hour ago
$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
56 mins ago
$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
56 mins ago
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
49 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
34 mins ago
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
20 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
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 ...
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$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/3.0/"u003ecc by-sa 3.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
49 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
34 mins ago
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
49 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
34 mins ago
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 49 mins ago
answered 54 mins ago
Spehro PefhanySpehro Pefhany
214k5162434
214k5162434
$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
49 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
34 mins ago
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
49 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
34 mins ago
$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
49 mins ago
$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
49 mins ago
$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
45 mins ago
$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
45 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$begingroup$
Of course, they will both be 3.3V logic from the same source. This cleared up my question, thanks.
$endgroup$
– Marius Gulbrandsen
43 mins ago
$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
38 mins ago
$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
38 mins ago
$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
34 mins ago
$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
34 mins ago
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 35 mins ago
RaphaelPRaphaelP
494
494
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
20 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
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
20 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
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 24 mins ago
pjc50pjc50
34.5k34288
34.5k34288
$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
20 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
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
20 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
$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
20 mins ago
$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
20 mins ago
$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
9 mins ago
$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
9 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
$begingroup$
I see. I need the signal to be read in the microsecond range, preferably < 1us.
$endgroup$
– Marius Gulbrandsen
5 mins ago
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 ...
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$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 ...
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$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 ...
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$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 ...
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 57 mins ago
Daniel SapirDaniel Sapir
1
1
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Daniel Sapir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
1
$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
1 hour ago
$begingroup$
I'm not sure what you mean here, could you elaborate?
$endgroup$
– Marius Gulbrandsen
1 hour ago
$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
1 hour ago
$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
56 mins ago