Floating pins on Microcontroller

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Hello friends.

I have this question for you.

I am building microcontroller project with a Picaxe and i want to be able to reprogram it without rmoving it from the PCB. so i was thinking that ok Serin pin uses the 10K resistor as pulldown when nothing is being downloaded to it but what about Serout pin that connects to the RXD pin of the PC through an 180 Ohm resistor ? when main program is executed will Serout pin not float ?
The rest of the picaxe pins will be either used or connected to ground through 10K resistors.


here is the diagram of the download cable circuit according to picaxe manual.


Thanks !
 

Attachments

  • programming.png
    programming.png
    82.7 KB · Views: 133

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Not true. Floating input pins are a problem. Make any unused pin an output.

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
With the picaxe there is a potential problem with the serial input pin floating. A stray voltage here could place the picaxe into programming mode

See here.

Never, ever, leave the serial input pin of the PICAXE chip floating (unconnected). The 'serial in' download pin is shown in the pinout diagrams above (e.g. leg 2 on 08M2). A floating serial in pin will result in unreliable operation and is inviting trouble!

28 and 40 pin chips also have a 'reset' pin, which should also not be left floating (use a 4k7 or 10k resistor to V+).
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Microchip says all floating pins should be outputs. If an floating pin is an input and it floats to about 1/2 Vcc it can turn on both of the complementary MOSFETs on and a large current can flow.

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
My mistake. I thought a picaxe was involved. It has some pins which are always inputs.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
A picaxe is just a normal PIC microcontroller with a bootloader programmed in, same as an Arduino is just a ATMega.

Typically, the only pin that is only an input is the reset pin, which must have an external pullup always.

On the Microchip forum, a common question is "My program works when plugged in to the pickit but does not work when I power it independently." The answer is almost always that the reset pin needs to be pulled up (the pickit does this of course.)

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A picaxe is just a normal PIC microcontroller with a bootloader programmed in, same as an Arduino is just a ATMega

However, the point is that it has some pins that are always inputs. From memory the serial input pin is one of these. The added complication I'd that it is used by the bootloader to initiate downloading a program. If it is not properly terminated the bootloader can decide it is being programmed before you get to tell the chip the pin is an output (if indeed you can on a picaxe)

If you don't have a boot loader, this problem can be avoided. In this respect an arduino or a picaxe differ from a natively programmed microcontroller that they are based on.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
If the operation of the bootloader requires that the serial in pin must be an input (the chip does not), then it must be pulled up or down. So I think we are in agreement.

Bob
 
Top