Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Voltage of Input Pin with Pull-up Resistor – Atmega8

3 posters

Go down  Message [Page 1 of 1]

KerimF

KerimF

SimulIDE_1.0.1-R1386_Win32

On a real circuit, the voltage of an input pin with pull-up resistor (DDRx=0 and PORTx=1 in Atmega8) is Vcc (5V). The typical resistance of the pull-up resistor is around 35 KOhm.

I noticed that the voltage, at such a pin, is 0V instead.
The workaround is to add an external resistor (say 35 KOhm) to get 5V on that pin, so that reading PINx returns 1 instead of 0.
It is not a serious bug as long a user is aware of it.

arcachofo

arcachofo

I see...
Internal pullups are implemented but seems that it is only working if there is something connected to the pin.

arcachofo

arcachofo

Fixed at trunk Rev 1433.

Defran

Defran

The behavior of the internal pull up is identical with or wirhout cannections to the pin. Same in real circuit on a programmed controller.

Voltage of Input Pin with Pull-up Resistor – Atmega8 2022-115
Voltage of Input Pin with Pull-up Resistor – Atmega8 2022-116
Attachments
Voltage of Input Pin with Pull-up Resistor – Atmega8 AttachmentINTERNAL_PULLUP_TEST.zip
You don't have permission to download attachments.
(5 Kb) Downloaded 1 times



Last edited by Defran on Wed Dec 07, 2022 8:55 am; edited 3 times in total

arcachofo

arcachofo

The behavior of the internal pull up is identical with or wirhout cannections to the pin.
Mcu Pins inside Arduino has connections.
You need to test with a bare Mcu.

Defran

Defran

Tested on a free pin of this circuit made by me (Without Arduino board) with a ATM328 "a pelo".

Voltage of Input Pin with Pull-up Resistor – Atmega8 Leds_510

arcachofo

arcachofo

Tested on a free pin of this circuit made by me (Without Arduino board) with a ATM328 "a pelo".
Ok but we are talking about a bug in the simulator.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum