Prox / RFID
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Resume / Consulting
Contact Me

LDmicro Forum - turn off pull up reistors in atmega

(you are viewing a thread; or go back to list of threads)

turn off pull up reistors in atmega (by David R)
Can you change ldmicro to turn off the pull up resistors in the atmega32, they are vary strong and are causing me problems.
I am using A 10k pull down resistors in A normally low plc input card and the internal pullup resistors are loading one volt across them.
Kind Regards
Thu Dec 1 2011, 02:52:16
(no subject) (by Boris)
Use 2k2 resistors
Thu Dec 1 2011, 06:17:39
(no subject) (by David R)
Hi Boris,
I could do that or several other things including buffers etc, however I find this A bit contradictory as the atmega does not function as per the best practice described in the interfacing section see http://cq.cx/interface.pl#3 it also does not behave the same as the PIC's as you would expect.

So I fell the best solution is to aline all the parts so they are consistent with each other and the interfacing best practice section.

Fri Dec 2 2011, 02:28:09
(no subject) (by Boris)
LDmicro Forum search for- ATMega inputs
You will find what You need in that thread

Start off thread:
For me it is less painful to invert inputs for ATMega I was thinking to put 7414 on input of ATMega, I will try that today. Maybe You think that I ...
Fri Dec 2 2011, 06:11:24
(no subject) (by David R)
Hi thanks got all that, but I stall don't see why they need to be turned on in the first place as that thread is A negative result of the pullup.

To quote Jonathan "It's better not rely upon the on-chip pull-ups, since they are so weak."
Then I need to add my own pull up/down resistors anyway so I feel it is best to turn them off and let the user add there own resistors.

Can they be turned off or is there some programing issue I don't understand ?

Fri Dec 2 2011, 15:05:20
(no subject) (by Boris)
From LD Micro I dont think it is possible to turn it off.

Why is that so big problem for You?

Use 16F877A (switch Vcc) and everything is OK.

ATMega: when You program pin as input than it is connected internally to Vcc. You have to switch on-off ground to change the state of that pin. Ground is always ground no voltage drop to think about it.
Fri Dec 2 2011, 16:22:38
(no subject) (by David R)
These are the problems.

first I can't use PIC not enough memory.

I am using for A PLC input +24vDC for high this is an industry standard so I am not changing that, so pull low does not work.

I arranged my circuit as per Jonathan's interfacing recommendations which does not work due to the pullup.

The circuits I am building are all modular so I have Analog in, Digital in, Digital out, serial interface and special out cards.

I have also designed some different types of processor boards.

The problems are the need for strong pull down to combat the pull up, This then requires A lower value of series resistor driving the micro, this intern reduces the protection from voltage spikes and other things that go bad.

The voltage that appears across the pull down resistor subtracts from the noise immunity of the input.

When changing from an AVR to PIC processor there needs to be component changes made to what is meant to be standard cards
Fri Dec 2 2011, 22:57:44
(no subject) (by Boris)
Yes I see Your problem, only Jonathan can help You to change
LD Micro to dissable that resistor.
Sat Dec 3 2011, 07:26:27
suggestion to pull up (by Magno)
Hello Friend, I also work with industrial PLC. if I understand your problem, I have a suggestion. Design the circuit to work with positive voltage input (+24) exciting an optical coupling, which would lead to negative potential pin of the microcontroller (GND). Then the pull-up resistors are no longer a problem to be essential.
Sat Dec 3 2011, 17:57:57
To Magno (by Boris)
If You do it that way You have negative logic in LD Micro.
All inputs must be negated and then simulation is opposite.
I tried and it is very hard to do it that way.
Sun Dec 4 2011, 12:15:31
(no subject) (by simon)
Hi David R . This is the schematic of hardware i use for years in industry enviroment and is ok . you need to set the CKOPT bit on Atmega to function normaly in noisy enviroment .
Sun Dec 4 2011, 12:52:08, download attachment hardware.JPG
Atmega 16 // Disable the pull ups resistors (by Gérard)
Hi all
For an ATmega16 - 16PU
Would you be so kind to confirm that's the way to disable all the pull ups resistors.
As I understand : PUD is on bit 2 in SFIOR , so to activate PUD (which disable all the pull ups) : write to 1 the bit 2 in 0x50.
Mon Aug 19 2019, 04:18:01, download attachment Capture.pdf
esactiva las resistencias pull ups (by Paulino)
(por Gérard)

Resistances can be active or deactivated, low level or high level, when the program is done.
Explanation; When we place a new X contact, a box will appear, in that box, we will mark it if you want pulup to be activated, if the box is not market, the resistors will be deactivated.
Mon Aug 19 2019, 06:13:45, download attachment contacto polup.ld
Por Paulino (by Gérard)
Hola Paulino

Mucha gracias por su mensage
Conozco esta funcion "Set HI input level before simulation" pero pensaba que esta justo por la simulacion y no por hacer el programa de verdad, compilar el .hex y grabar el AVR asi.
Mon Aug 19 2019, 08:16:53
(no subject) (by Paulino)
Thank you for answering the solution, and I'm glad it was fixed.

Gracias por contestar la solución, y me alegro que se haya solucionado.
Mon Aug 19 2019, 08:50:14
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):