> >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 > > 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) > > bye > csaba > The baseaddress can be found in the ROM BIOS parameter area at addresses: 0000:0400 COM1 0000:0402 COM2 0000:0404 COM3 0000:0406 COM4 0000:0408 LPT1 0000:040A LPT2 0000:040C LPT3 0000:040E LPT4 The ones that doesn't exist have 0 as baseaddress. -------------------------------- Ruben Jvnsson maxruben@mail.bip.net --------------------------------