Floating Pins ?

joe paul

Senior Member
Hi Folks,

I want to duplicate the circuit I just did on the AXE002 board, and I don't need more than 1 input and 3 outputs, with this 18M2. I intend to program the chip on another board then put the 18M2 chip in a socket on the homemade board. I don't need the full Darlington array, so there will only be 2 transistors, and the Mosfet for the outputs (with the necessary resistors for the 3). The only input will be from the HC-06 module.

Do I have to keep the pins I am not using pulled down with a resistor or can they float?

With the inputs for the programming cable, if I won't be programming the chip on this board, do I do anything with those pins?

I am trying to make the circuit as compact as possible.

Thanks!

Take care, Joe.
 

techElder

Well-known member
Howdy, Joe. Don't tie any pins to "ground" (except one), because most are "I/O" pins ... meaning sometimes they can be Output pins, so shorting to ground will damage them. (For the same reason, it isn't always good practice to tie unused pins together without some resistance between them. One might end up being HIGH and the other LOW.)

If you want to know that a pin is at a certain logic level, you will have to tie it there. Use a resistor around 10K - 22K to go to V+ or GND to be sure. I don't always do that, myself.
 

premelec

Senior Member
Nay, No , Never no floating pins nomore!

You can try pullup on - but never leave an input pin dangling receiving all the random electromagnetic noise we surround ourselves with!
 

joe paul

Senior Member
Hi TexasClodhopper and Premelec,

Thanks for the info! So best to just duplicate what the AXE002 board does, with a resistor on each in input pin (to ground) and a Darlington array on the outputs?

Thanks!

Take care, Joe.

P.S. Here is the AXE002 schematic:
5Untitled.gif
 
Last edited:

westaust55

Moderator
Personally I never tie or pull spare pins high or low.

Even if there were some electrical noise on a pin the likelihood of that impacting on your project would be virtually nil.
If a pin is floating up and down and you want to read in an entire port then you can use the AND command to mask off the unused bits.

I do recall there were reported cases with earlier (X1 parts?) with noise on a adjacent analog pins affecting ADC readings where the recommendation was to pull unused ADC pins low. But even with my many projects including ADC signals I never had a problem.

If you are trying to minimize power consumption then by all means use pull down resistors on spare pins.
 

joe paul

Senior Member
Hi Westaust55,

Power consumption is not an issue, but since this circuit will be in a tender (of sorts) on a toy train fed 16-18 VAC on the rails, I don't know about electrical interference with the chip or the HC-06 module. I am getting this voltage regulator http://www.ebay.com/itm/SUPERNIGHT-DC-DC-12V-24V-to-5V-5A-Step-Down-Regulator-Module-25W-Converter-/181254966017?pt=LH_DefaultDomain_0&hash=item2a33a34b01 but I will rectify the AC coming in and filter it with a large capacitor (I've done this before) but never with sensitive electronics.

Nothing like just giving things a try.

Thanks for the advice. I will keep everyone posted.

Take care, Joe.
 

AllyCat

Senior Member
Hi Joe,

I am trying to make the circuit as compact as possible.
So I certainly wouldn't bother putting (pull-down) resistors on all the unused pins, but you must put a pull-down on the programming input pin. It could be tied directly to ground, but personally I would recommend a resistor here (say 33k, but not critcal), in case you decide later that you want to debug or program in situ..

As for any unused pins, you could set them as (low) outputs, but (where available) the PULLUP command is a safe and tidy way to prevent the pins floating.

Cheers, Alan.
 

bpowell

Senior Member
If you have an input pin floating...provided you're not using its value in your program, what will it hurt?

I always leave my unused pins floating...I could short them to GND or 5V all day long, it won't affect my program...sometimes I have a serial stream hitting a pin that I've not configured...my project could care less that serial data is knocking on that input...until I decide I want to read that input.

Of course, I'm an amateur though...so listen to the pros here! ;) I may be one big solar-flare away from multiple project failure.
 

joe paul

Senior Member
Hi Alan,

Thanks for the info! So I'll put a 33k resistor on C.4 (18M2) to ground. Things are coming together in my head!

Take care, Joe.
 

joe paul

Senior Member
Hi Bpowell,


I'll try it both ways and see what happens. As long as this circuit is never connected to my laptop, I'll try everything!

So much suspense! Time will tell! But that's the fun of all of this.

Thanks!

Take care, Joe.
 
Top