Connect with us

Floating pins on Microcontroller

Discussion in 'Microcontrollers, Programming and IoT' started by HellasTechn, Oct 5, 2016.

Scroll to continue with content
  1. HellasTechn

    HellasTechn

    1,546
    215
    Apr 14, 2013
    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 !
     

    Attached Files:

  2. Bluejets

    Bluejets

    4,422
    938
    Oct 5, 2014
    Floating pins on Picaxe are normally no problem.
     
  3. BobK

    BobK

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

    Bob
     
  4. Bluejets

    Bluejets

    4,422
    938
    Oct 5, 2014
    Like i said, I never had a problem.
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    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+).
     
  6. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    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
     
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    My mistake. I thought a picaxe was involved. It has some pins which are always inputs.
     
  8. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    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
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,449
    2,809
    Jan 21, 2010
    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.
     
  10. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    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
     
    (*steve*) likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-