06 Close RS-485 multi-bus (release RS-485 bus)

Entry Parameters:

AH = 6

Returned Values:

None

void TC_485_close()

{

regs.h.ah = 6; int86(0x33,®s,®s);

}

NOTE:

1)While the RS-485 post is used for serial input/output (character I/O) communication. The application must enable RS-485 first to set communication characteristic and make the system ready for serial I/O and then open its RS-485 to occupy the bus prior to reading or writing data. The application should close the RS-485 port when the data pack transmission completed and release the bus to be used by other terminals. And the application should disable the RS-485 port while all data packs are send or received.

Ex.

Enable RS-485 port for character based communication

?

Open RS-485 to occupy the bus

?

Repeat { read/write data to RS-485 port } until completed

?

Close RS-485 to release the bus

?

Disable RS-485 port for character based communication

2)When the RS-422/485 is controlled by use of INT 33H and the port is assigned as host. The protocol must set as “NONE”.

3)If the RS-422/485 port acts as serial port, and the flow of hand shaking will be controlled by user program instead of XON/XOFF. You must set the flow control as “NONE”.

3-33

Page 34
Image 34
Unitech MR350MKII manual Close RS-485 multi-bus release RS-485 bus