Power status is communicated to the Computer using the control lines on an RS232 port. When power is lost, the UPS board communicates this information to the computer by deactivating CTS. The software sees this event and initiates its shutdown procedure. The UPS board has a watchdog timer that times out after 3 minutes, unless it is retriggered using the RTS line. The computer software is responsible for toggling the RTS on the serial port every 30 seconds and resetting the watchdog timer. I need to write a C program to
*toggle RTS line every 30 seconds
*shutdown the computer when the cts signal is lost