|
Forum Index : Microcontroller and PC projects : Digital Input Pins
| Author | Message | ||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1116 |
Reading the 470 data sheet, I came across the following in Chapter 12 - I/O Ports:- From this, do I understand correctly that it is recommended when using a pin as DIN, that it should be pulled either high or low with a pull up/down resistor? So if the DIN pin is looking for an active low, the pin should have a pullup resistor or if the DIN pin is looking for an active high, it should have a pulldown resistor? Would the weak pullup or pulldown internal resistors do the job? panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
I wish someone in Microchip would settle this once and for all. Yes, they do say that in the datasheet and it sounds dire BUT on pages 19 to 25 they state that all inputs are "Schmitt Trigger input with CMOS levels" and that means that the inputs can accept indeterminate input levels. I know that older chips with normal input buffers can suffer from the issue described and that is why people automatically warn against letting microcontroller inputs float. However the PIC32 is a modern chip and uses Schmitt Trigger buffers. Hopefully someone with knowledge of the PIC32 input buffer configuration can jump in here. To settle this I once connected a number of digital inputs in parallel to an analogue voltage source and varied the level across the full input range while accurately monitoring the current drawn by the chip and the inputs. Regardless of the input voltage the current drawn did not vary by more than a hundred microamps and that is a sure indication that damaging currents are not occurring. I am sure that Microchip would not say something like that without reason but I am damned if I know what it is. If you are concerned you can set unused I/O pins to digital outputs or use the internal pullup/pulldown resistors on floating inputs - it does not hurt and will help protect against static discharges. Geoff Geoff Graham - http://geoffg.net |
||||
| Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
There are no hard and fast rules, a lot depends on the gate thresholds of the mosfets within the device, and the supply voltage, as well as the "on" resistance of the particular mosfets. As mentioned above, sometimes internal feedback as in a Schmidt trigger is involved. In some cases we need to deliberately bias a digital device right into the centre of the linear region, as in many types of oscillator circuits, particularly crystal oscillators, and the chips work fine. Always wise to read the application notes for the particular device very carefully. Cheers, Tony. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |