UART Wildcard User Guide
<< Previous | Next>>
C: RS232
4th: RS232 ( -- n )
A constant (= 2) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS232.
C: RS422
4th: RS422 ( -- n )
A constant (= 1) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS422.
C: RS485
4th: RS485 ( -- n )
A constant (= 0x21) that, when passed as a parameter to the Set_Protocols function, configures the specified channel’s data format for RS485.
C: void RS485_Rcv_UART ( int channel_num, int module_num )
4th: RS485_Rcv_UART ( channel_num\module_num -- )
Puts the specified RS485 channel into receive mode. Turns on the receiver and turns off the transmitter of the RS485 driver chip on the specified channel. The application program is responsible for making sure that all pending outgoing characters have been transmitted before invoking this function, as characters that have not yet been transmitted will be lost when the transmitter is disabled. To avoid this problem, use the higher level function named RS485_Rcv_When_Xmit_Done.
C: void RS485_Rcv_When_Xmit_Done ( int channel_num, int module_num )
4th: RS485_Rcv_When_Xmit_Done ( channel_num\module_num -- )
Puts the specified RS485 channel into receive mode. Waits and PAUSEs until the transmit FIFO is empty, then turns on the receiver and turns off the transmitter of the RS485 driver chip on the specified channel. This function ensures that pending outgoing characters are fully transmitted before disabling the RS485 transmitter.
C: void RS485_Xmit_UART ( int channel_num, int module_num )
4th: RS485_Xmit_UART ( channel_num\module_num -- )
Puts the specified RS485 channel into transmit mode. Turns on the transmitter and turns off the receiver of the RS485 driver chip on the specified channel. The application program is responsible for making sure that all expected characters have been received before invoking this function, as incoming characters that have not yet been queued in the receiver FIFO will be lost when the receiver is disabled.
C: void Run_Demo ( void )
4th: Run_Demo ( -- )
The top level function in the demonstration program. When called, it builds and activates two tasks named CH1_TASK and CH2_TASK. Each task runs the interactive monitor using a channel on the UART Wildcard. The initialization is performed by Default_UART_Init (see its glossary entry). Each task revectors the Emit, Key and Ask_Key (also called ?KEY) primitives so that all task I/O is implemented via the UART Wildcard. The default QED-Forth task stays active using the serial port on the Mosaic Controller. Thus, invoking this function allows you to simultaneously run three serial connections on the Mosaic Controller.
<< Previous | Next>>
|