Version française

To set COM PORT in raw hdlc mode
set COM PORT electrical interface
set COM PORT modulation mode
General notices

To set COM PORT in raw hdlc mode

see MCXPCI device driver user manual to get all relevant information about SET_SYNC_STATE ioctl.
Examples are given below with different clock modes :

mcxmode COMx:9600,n,8,h,ettd,full
	TxClock supplied to input pin 15 by an external source
	RxClock supplied to input pin 17 by an external source
	pin 24 is set to High state

mcxmode COMx:9600,n,8,h,etcd,full
	TxClock supplied by internal Baud Rate Generator (set to 9600 bps)
	RxClock supplied by internal Baud Rate Generator (set to 9600 bps)
	BRG signal is output on pin 24 (set to 9600 bps)

mcxmode COMx:9600,n,8,h,nullmdm,full
	TxClock supplied by internal Baud Rate Generator (set to 9600 bps)
	RxClock supplied by pin 17
	BRG signal is output on pin 24 (set to 9600 bps)

To set other clock modes, write your own program or modify mcxmode.c
clock modes are set in SET_SYNC_STATE DeviceIoctl.

Additionnal information :
In RS485, clock are not supplied by separate signal. Clocking information are encoded
into data thanks NRZi, FM0 or FM1 encoding method. 
In this case, use the following clock combination :
	TransmitClockSource = MCX_CLOCK_BRG;	
	ReceiveClockSource = MCX_CLOCK_DPLL;		
	TxClockPinSource = MCX_CLOCK_TRXC_HIGH;		

set COM PORT electrical interface

→ execute RSMDE command
Write your own program, by using CMD or CMD_AUTO ioctl and RSMDE command 
or
Run from command line the ACKSYS mccioctl.exe demo program

see MCX MULTIPROTOCOL user manual to get all relevant information about RSMDE command

To set RS232 mode
mccioctl COMx RSMDE AUTO 0 0

To set RS422 mode (2 pairs of wires)
mccioctl COMx RSMDE AUTO 0 1

To set RS485 mode (1 pair of wires)
mccioctl COMx RSMDE AUTO 0 2

set COM PORT modulation mode

→ execute VINIT command
NRZ mode is by default. The API SetCommState set NRZ modulation by default.
To set another modulation mode (NRZi, FM0 or FM1) execute the VINIT command.
see MCX MULTIPROTOCOL user manual to get all relevant information about VINIT command.

Write your own program, by using CMD or CMD_AUTO ioctl and VINIT command 
or
Run from command line the ACKSYS mccioctl.exe demo program

To set NRZi mode 
	mccioctl COMx VINIT AUTO 0 0x1F 0x2E

To set FM0 mode
	mccioctl COMx VINIT AUTO 0 0x1F 0x6E

To set FM1 mode
	mccioctl COMx VINIT AUTO 0 0x1F 0x4E

General notices