Craig Webb wrote: >At 14:14 3/10/98 -0500, you wrote: >>Does anyone know off-hand the memory address and value for setting the RS232 >>TX line high on a PC? I need to trigger a relay connected to this line. >> >>Thanks. >> >>C. Webb The Csaba replied with: >Hi, >First of all, what do you mean HIGH on TX line on RS232 port of PC ? >The TX and RX lines (in RS232) are not on TTL level. >The 'logic 1' on TX (idle state) means this line is about -12V respect >to ground, the 'logic 0' on TX (mark state) means this line is about +12V >respect to ground. >Apart from this, you can't change the state of TX in this way (to control >relay). >Instead of TX, use the RTS or DTR signal. >These signals are TTLs, and it is easy to use as general purpose bits. >To change these signals, set or clear the appropriate bit: >(DTR) >[baseaddr+4].0 (ie. base address of serial port, eg. com1=0x3f8, >so the appropriate bit is the lsb of 0x3fc) >(RTS) >[baseaddr+4].1 (ie. base address of serial port, eg. com1=0x3f8, >so the appropriate bit is the second bit of 0x3fc) RTS or DTR are NOT TTL level signals. You will have to pass them through a level translator (such as a 1489 or the RX half of a MAX232) to get TTL/CMOS level outputs. From here, the signals can be used to control a relay driver (such as a ULN2003A). myke "If people don't know what you're doing, they don't know what you're doing wrong." - Sir Humphrey Appleby K.C.B