This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Newbie GPIO config question

It's been a while since this Java developer really understood EE concepts.

Could someone jog my skills and explain to me roughly what the different pin rive modes are, the reference manual is pretty terse. For example, what is the different between "High" (high impedence) and "Disconnect", isn't that one and the same?! :P

I'm working with the pca10000 and would like to use the leds on it (setup to sink from Vcc). I guess I have to set pin (1) to turn them off, and clear (0) to turn on, right? Then which of the drive modes should I use? Also, is there a GPIO_LED_CONFIG macro for such led setup I missed?

Merci! Mike

  • This is correct I guess I have to set pin (1) to turn them off, and clear (0) to turn on. High is not meaning high impedance but "high" voltage - in the vicinity of VDD or a couple of volts. Normally also associated with logic 1. Admitted the terminology is very ambiguous and lack's standards and maybe just discipline.

    High drive means that the transistor pulling the signal level has high current drive capability i.e. it can deal with a lot of current without getting much voltage across. So it really should read "high current drive capabilty" So standard drive means it is a bit poorer at handling current, and the limit: disconnect: It does'nt even attempt to draw current.

    This applies for both the transistor which pulls the signal towards VDD and for the other pulling towards GND=0.

    To put fire to the idea: So you can have a high drive (current capabilty) transistor which dives the pin to low=0V! You can have a standard drive (capabilty) transistor which drives the pin to low. and so on - see the different combinations on page 59 in nRF51 Series Reference Manual v1.1. So for instance: the H0D1 high drive 0 and disconnect 1 is equivalent to the god old open collector or open drain output which you may have heard about.

    For your LED driver you would need to select either H0XX or S0XX. D0XX would definitely not light your LED. Most likely H0XX is required, but depend on the current requested.

    Does this clear things? Or ask again. D'rien henning

  • Thanks Henning, that clearly clears things up. So disconnect is effectively the high-impedance state?

    Catching up on ee lingo, Mike

  • well sort of. If you mean high-impedance state aka tri-state in old TTL jargon then not 100% the same because disconnect in nRF51 terms refers to one of the two output drive transistors being disconnected, but note that the other will be either standard or high drive capability, so unless the signal level they drive correspond to being off, you will not have high impedance at the pin. Example with the open collector i mentioned previously. The pull-up transistor is disconnected and the other may or may not be drawing current depending on the level driven at the port. (0=Transistor on, 1=Transistor off=> High impedance at pin.

    To stir up the mud a bit we have the pull-up and pull-down resistors as well. They mostly are relevant when the pin is in input mode, although I think you can enable them also on outputs. Combined with the mentioned open collector/drain topology, this can be useful if you have several outputs tied together in a wired-or/wired-and topology - gives you an or/and of all connected signals. This is the way the I2C bus works in fact-all parties must release the line before it is deemed free.

    henning For your LED use H0XX drive and no pull-up/down's, and you will be fine henning

  • Hello, sorry I didn't get why should we use standard drive in case it worse than high drive? Maybe it provides us better power consumption? how much better it will be? 

Related