kclenden@silver.ucs.indiana.edu (Kevin Clendenien) (10/20/90)
Well, the subject states the question. I actually want to know if I've lost the carrier during a modem connection. Also, what do the parameters UCR, RSR, TSR, and SCR represent in the call to the XBIOS when configuring the RS232 port? -------------------------------------------------------------------------- kclenden@silver.bacs.indiana.edu Kevin Clendenien BLAST BBS - (812) 332-0573 BLAST member "I want someone like you, only nicer."
logajan@ns.network.com (John Logajan) (10/20/90)
kclenden@silver.ucs.indiana.edu (Kevin Clendenien) writes: >I actually want to know if >I've lost the carrier during a modem connection. Also, what do >the parameters UCR, RSR, TSR, and SCR represent in the call to >the XBIOS when configuring the RS232 port? Controlling the RS232 port from GFA Basic. An actual example. Void Xbios(15,7,0,&H88,1,1,-1) ! RS232 configuration/baud rate. (See below.) Rem Rem Configure RS232 - Xbios(15,baud,ctrl,ucr,rsr,tsr,scr). Rem baud = 0/19200, 1/9600, 4/2400, 7/1200, 9/300, 13/110. Rem ctrl = 0/None, 1/XOFF-XON, 2/RTS-CTS(doesn't work), 3/both. Rem ucr = 8bits, 1stop, noparity. Rem rsr = recv enabled. Rem tsr = xmit enabled. Rem scr = not used. Rem Note the use of -1, above, to RETAIN current variable settings. 0 19200 1 9600 2 4800 3 3600 4 2400 5 2000 6 1800 7 1200 8 600 9 300 10 200 11 150 12 134 13 110 14 75 15 50 ucr bits: 0 not used 1 0=odd 1=even parity 2 0=no parity 1=parity 3,4 (in 4,3 order -->) 00-sync,01-async/1stopbit,10-async/1.5,11-2stopbits 5,6 (6,5 order) 00-8bits,01-7bits,10-6bits,11-5bits. 7 0=direct clock, 1=divide by 16 (use div/16 to get correct baud rates!) rsr bits: 0 1=receiver enable 1 1=syncronous strip? 2 1=start bit detected 3 1=break detected 4 1=frame error 5 1=parity error 6 1=overrun error 7 1=buffer full tsr bits: 0 1=transmitter enable (else see state below!) 1,2 (2,1 order) 00=output high,01=high,10=low,11=loop back. 3 1=force break 4 end of transmission ? 5 auto turnaround ? 6 1=underrun error 7 1=buffer empty scr: Some sort of syncronous data i/o port. Peek(&HFFFA01) Bit 0: Centronics busy Bit 1: RS232 data carrier detect - input <<<<<----- *this is it* * * * Bit 2: RS232 clear to send (CTS) - input Bit 3: reserved Bit 4: keyboard and MIDI interrupt Bit 5: FDC and HDC interrupt Bit 6: RS232 ring indicator Bit 7: Monochrome monitor detect (1=color) -- - John Logajan @ Network Systems; 7600 Boone Ave; Brooklyn Park, MN 55428 - logajan@ns.network.com, 612-424-4888, Fax 612-424-2853
R_Tim_Coslet@cup.portal.com (10/20/90)
John Logajan wrote...
>scr: Some sort of syncronous data i/o port.
Actually this is a register to hold the "sync" character for syncronous
serial I/O. This character is sent automatically at the beginning of each
data transmission, and is used by the receiver to synchronize with the
recieved data.
In asynchonous modes this is not used (the start bit performs this function
instead, but needs to appear on each byte. You only need one "sync" character
per data block and a block might have thousands of characters)
Of course in synchronous mode you also need to send a clock with the data
and in asynchronous mode no clock is needed
R. Tim Coslet
Usenet: R_Tim_Coslet@cup.portal.com
BIX: r.tim_coslet