On 5 May 2010, at 12:01, Thomas Nyström wrote: > Lars Nooden skrev: >> Two questions regarding GPIO: >> >> 1) Are there any good text-book definitions for gpio configuration? I've >> looked around a bit for definitions of 'open-drain output' 'push-pull >> output' and so on, but not good at finding anything. What I know of these >> I've guessed from measuring states with a muiltimeter. > > You can try Wikipedia for this. > >> 2) If one is going to try to steer 5v relays from JP5, can it be done >> directly and are there recommended specs for the 5vdc side of the relay, >> such as pull-up resistor and a diode to eat the voltage spike when the >> relay is released? > > It might be possible depending on how much current the relay will need. > You have to check the current capabilities of the outputs. On the NET5501 > there is a PC87366 and that circuit has the capability to sink 6 mA on > the GPIO-pins. I don't think it is necessary to use a pull-up but the > diode is absolutely necessary, otherwise you will destroy your hardware. > > If the relay needs more than 6 mA then you should add an external transistor > with a base / gate resistor and set the GPIO output in push-pull mode. > It might also be necessary to have a pull-down resistor to be sure that the > transistor is turned off after a reset. You still need the diode on the > relay coil. > > The diode should be placed as close as possible to the relay coil and I > recommend a fast diode (for example 1N4148), not an ordinary rectifying > diode.
Bear in mind also that the diode will make the relay slow to release, so if the contacts are to carry a lot of current (particularly DC) you may need to derate accordingly. > /Thomas > > -- > --------------------------------------------------------------- > Svensk Aktuell Elektronik AB Thomas Nyström > Box 10 Phone: +46 73 069 69 30 > S-191 21 Sollentuna Fax: +46 8 35 92 89 > Sweden Email: [email protected] > --------------------------------------------------------------- > > _______________________________________________ > Soekris-tech mailing list > [email protected] > http://lists.soekris.com/mailman/listinfo/soekris-tech > > -- Bob Bishop +44 (0)118 940 1243 [email protected] fax +44 (0)118 940 1295 mobile +44 (0)783 626 4518 _______________________________________________ Soekris-tech mailing list [email protected] http://lists.soekris.com/mailman/listinfo/soekris-tech
