Chapter 5
5-
7
port_set_speed(1,115200L);
//Enable Port FIFO. Here we enable 128 byte FIFO for port1.
port_enable_fifo(1);
//After these above settings are enabled, you can apply any
other function library to implement your program.
}
—A receive-and-transmit example program for the ADAM-5090
main()
{
int err_value, char character port_installed(1)
:
:
port_enable_fifo(1);
//check whether error has been received or not
err_value=port_rx_error(1);
//if error detected, print out the message
if(err_value)
{
printf(“\n Rx Error, The LSR Value=%02X”, Err_value)”;
}
//check whether FIFO receives data or not; if data received, read a
character
if(port_rx_ready(1))
{
character=port_rx(1);
}
//check whether FIFO is empty or not, if empty, send a character
if(port_tx_empty(1));
{
port_tx(1, character)
}
}
Содержание ADAM-5080
Страница 4: ...Introduction 1...
Страница 6: ...Analog Input Modules 2...
Страница 8: ...Chapter 2 2 3 Application wiring Figure 2 2 RTD inputs...
Страница 14: ...Chapter 2 2 9 Application wiring Figure 2 7 Millivolt and volt input Figure 2 8 Process current input...
Страница 19: ...Analog Input module 2 14 ADAM 5000 IO modules User s Manual Application wiring Figure 2 11 Thermocouple input...
Страница 21: ...Analog Output Module 3...
Страница 24: ...Digital Input Output Modules 4...
Страница 56: ...Serial Communication Module 5...
Страница 63: ...Analog I O Modules Calibration 6...