Biomedical Engineering Reference
In-Depth Information
ADC sampling instants
Transmission time over link
ADC sample
(1 kHz)
Time
520 ยต s
Serial Tx
(19.2 kbps)
idle
Time
Fig. 3.12
Timescale activity of serial link versus ADC sampling
(DAS CARD)
DCE
USART input
buffer
MATLAB
data
RS-232 cable
DTE
Event triggering
Fig. 3.13
Data flow schematic between MATLAB and DAQ hardware
Most traditional PCs are provided with one or more serial ports (popularly
known as 'COM' or communication port), which contain a USART IC as the
interface between the application software and the external world. A portion of the
computer memory is allocated as input and output buffer associated with the same
USART. The memory size allocated to this buffer can be changed through soft-
ware instructions. As shown in Fig. 3.10 , the data exchange between DCE (here
stand-alone DAS card) and the PC takes place through the same buffer. It serially
transfers out the data from the output buffer memory to the external device or
receive data from external device through input buffer with the specified baud rate.
For data transfer operations with the external work using the serial port, a tool is
provided to access the USART through a 'serial' object, which can be directly
created in MATLAB platform to achieve real-time communication. All properties
of this 'serial' object can be changed using MATLAB commands. For seamless
transfer of data with external DAS card, the principle of 'event-driven program-
ming' is used, which provides a programmer to access the USART buffer for data
input/output based on certain 'event' generated in real-time operation using
MATLAB commands.
For a typical data input process, the following sequence of events take place:
1. Data from the external device (stand-alone DAS card) continuously fill up the
input buffer of the USART using the RD line;
Search WWH ::




Custom Search