Programming The Microcontroller; Receiver Operation - HP E2261A User Manual

Quad serial m-module
Table of Contents

Advertisement

Programming the
Microcontroller

Receiver Operation

56 Register Programming Information
At power-on or reset, the HP E2261A sets the default baud rate and data
format for each port; both transmitter and receiver for each port is disabled.
The host computer (VXI controller) must START/STOP specific port(s) to
receive or transmit. The host computer can CLOSE a port without using the
disable command. The difference between CLOSE and STOP is CLOSE
clears the port's buffer.
The host computer sends commands to and receives data from the
microcontroller on the HP E2261A M-Module. Microcontroller register
commands are described later in this chapter. The proper sequence to send a
command to the HP E2261A microcontroller is:
1. Read the value of the CPRDY bit (bit 0) in the Command Status
Register (at address 26
receive a new command (bit value = 1). If bit value = 0 then the
microcontroller is busy, do not send the command.
2. Write the parameter to the Parameter Register(s) 0/1 (addresses 22
and 24
respectively).
h
3. Write the command (an integer, listed in this chapter as a hexadecimal
number) to the Command / Response Register (address 20
command specifies the port. Writing to the Command Register
signals the M-Module microcontroller to accept the command and
parameter value.
4. Read the value of the CPRDY bit (bit 0) and the DONE bit (bit 7) in
the Command Status Register (at address 26
microcontroller has completed the command. Both bit values should
be 1.
5. Read the CERR bit (bit 6) of the Command Status Register (address
26
) to ensure an error did not occur. A bit value of 0 indicates an
h
error did not occur.
6. Read the resulting value (if any) from the parameter registers.
The following discussion describes general receiver operation. If you are not
using the supplied driver (either SCPI or VXIplug&play), then you should
follow these general guidelines. Refer to Figure 4-2.
1. The host computer must open the port and enable the port to receive
data. The host can send the Start Receiver Command (2B
necessary, set the port's characteristics (baud rate, stop bits,
handshake mode, etc.). After the receiver is enabled, the port begins
waiting for a start bit from the device.
2. As data is received, the UART on the M-Module stores the data in the
buffer and continues receiving data. Each port has a 16 kByte buffer.
) to verify the microcontroller is ready to
h
) to verify that the
h
h
). The
h
). If
h

Advertisement

Table of Contents
loading

Table of Contents