On Fri, May 23, 2003 at 08:57:37PM -0400, Greg Brown wrote: > Hey all. Is it possible, using C, to monitor voltage on one pin of a > serial port when voltage is supplied from an outside source or do I > have to knuckle under and learn some assembly for this task? What I'm > after here is with an embedded linux machine mounted in a car and I > want to have power supplied by an always-on supply in the car. I'd > also like to have a pin on a serial port connected to a "only on when > running" wire (somehow). So when the voltage drops to zero on the > "only on when running" pin the embedded device will shut itself down > automatically (the device would be turned on manually via an "on" > button). > > Is this theoretically possible using C? > > Greg
This is how "dumb" UPSes tell the PC that power is lost - the PC monitors RTS or some other line, and the UPS sets this to one value or the other to indicate power is lost. Check the sources for "genpower" or other UPS monitoring programs to see how this is done... Corey > > _______________________________________________ > TriLUG mailing list > http://www.trilug.org/mailman/listinfo/trilug > TriLUG Organizational FAQ: > http://www.trilug.org/faq/TriLUG-faq.html _______________________________________________ TriLUG mailing list http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ: http://www.trilug.org/faq/TriLUG-faq.html
