Anritsu Spectrum Master MS2711D Programming Manual page 132

Fast. accurate, repeatable, portable spectrum analysis
Hide thumbs Also See for Spectrum Master MS2711D:
Table of Contents

Advertisement

case '4':
break;
case '5':
break;
default:
break;
}
// disable null stripping
CommSettings.fNull = FALSE;
// RTS flow control
CommSettings.fRtsControl = RTS_CONTROL_ENABLE;
// XON/XOFF in flow control
CommSettings.fInX = FALSE;
// XON/XOFF out flow control
CommSettings.fOutX = FALSE;
// DTR flow control type
CommSettings.fDtrControl
// number of bits/byte, 4-8
CommSettings.ByteSize = 8;
// 0-4=no,odd,even,mark,space
CommSettings.Parity = NOPARITY;
// 0,1,2 = 1, 1.5, 2
CommSettings.StopBits = ONESTOPBIT;
/* Setting the COM State with the changed parameters
Syntax -
BO–L SetCommState(
HANDLE hFile,
LPDCB lpDCB
);
*/
PortReady = SetCommState (ComHandle, &CommSettings);
/* Setting the parameters for the timeouts.
NOTE: Without Timeout Settings, Reading the COM Port will not work
properly*/
// This gives the Timeout value for each bytes received
timeout.ReadIntervalTimeout = MAXDWORD;
timeout.ReadTotalTimeoutConstant = 0;
timeout.ReadTotalTimeoutMultiplier = 0;
/* Sets the communication timeouts
Syntax -
BOO– SetCommTimeouts(
HANDLE hFile,
LPCOMMTIMEOUTS lpCommTimeouts
);
*/
SetCommTimeouts(ComHandle, &timeout);
if(PortReady)
131
CommSettings.BaudRate = CBR_56000;
CommSettings.BaudRate = CBR_115200; // rate - 115200–
CommSettings.BaudRate = CBR_9600;
= DTR_CONTROL_ENABLE;
// handle to communications device
// pointer to device-control block structure
/* pointer to comm tim omm.t structure */
// rate - 56000
//Default - 9600
// handle to comm dev omm.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Spectrum Master MS2711D and is the answer not in the manual?

Table of Contents