151-0153 Rabbit Semiconductor, 151-0153 Datasheet - Page 133

no-image

151-0153

Manufacturer Part Number
151-0153
Description
ASSEMBLY - RABBITFLEX CABLES
Manufacturer
Rabbit Semiconductor
Series
RabbitFLEX™r
Datasheet

Specifications of 151-0153

Accessory Type
Cable Assembly
For Use With/related Products
BL300F
Lead Free Status / RoHS Status
Vendor undefined / Vendor undefined
DESCRIPTION
RETURN VALUE
SEE ALSO
RabbitFLEX User’s Manual
void ser485Tx(void);
Enables the RS-485 transmitter. The brdInit() function must be executed before running this
function. This function is non-reentrant.
After the byte or block of data has been transmitted, the RS-485 transmitter must be idle and its
transmit buffer empty before an application can disable the transmitter and thus receive data from
the RS-485 interface. There are two methods for identifying when to disable the transmitter.
1. Poll the receive data buffer for the transmitted data that is echoed back to it. This is the easier
2. Read SxSR, the status register of the serial port you are using. Bits 2 and 3 report on the RS-485
None
brdInit
method. The following code snippet illustrates disabling the transmitter after one byte has been
transmitted using serial port C. You can also send a block of data before disabling the transmit-
ter.
transmitter and its buffer. The following code snippet illustrates how to check these bits if you
are using serial port C.
ser485Tx();
serCputc ( 0x55 );
while (serCgetc() == -1);
ser485Rx();
ser485Tx();
serCputc(0x55);
// Wait for Tx Data buffer to become empty
while(serCwrFree() != COUTBUFSIZE);
// Wait for Tx buffer and shift register on uP to become empty
while(RdPortI(SCSR)&0x08 || RdPortI(SCSR)&0x04);
ser485Rx();
,
ser485Rx
ser485Tx
www.rabbit.com
// enable transmitter
// send byte
// wait for echo
// disable transmitter
127

Related parts for 151-0153