How is the internal pullup resistor in a microcontroller wired? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm 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
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
How many time has Arya actually used Needle?
Flash light on something
What order were files/directories output in dir?
Semigroups with no morphisms between them
Dyck paths with extra diagonals from valleys (Laser construction)
AppleTVs create a chatty alternate WiFi network
Is CEO the "profession" with the most psychopaths?
Why is it faster to reheat something than it is to cook it?
How often does castling occur in grandmaster games?
How to align multiple equations
Antipodal Land Area Calculation
What to do with repeated rejections for phd position
Putting class ranking in CV, but against dept guidelines
Does the Mueller report show a conspiracy between Russia and the Trump Campaign?
Should a wizard buy fine inks every time he want to copy spells into his spellbook?
Why we try to capture variability?
Can a Beast Master ranger change beast companions?
What is Adi Shankara referring to when he says "He has Vajra marks on his feet"?
What does 丫 mean? 丫是什么意思?
How fail-safe is nr as stop bytes?
What are the discoveries that have been possible with the rejection of positivism?
What is the home of the drow in Flanaess?
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
How is the internal pullup resistor in a microcontroller wired?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm 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$
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
1
$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
165113
165113
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
1
$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
1
$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
1
1
$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 ...
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
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
214k5164436
214k5164436
$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
844
844
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
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
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 ...
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 Apr 15 at 15:05
Daniel SapirDaniel Sapir
31
31
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
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
1
$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