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

Parents Reply Children
  • 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

Related