Along the same lines, the data sheet for the part Alain points out has on page 11 another nice way of doing it.
http://www.google.com/url?sa=t&sourc...SILdHEv5RRcHYQ