- 2 1 -
4/ Using the CR-510
Many of the features of the CR-510 are software dependent. Switch settings and loading procedures
depend on your particular application. However, there are certain aspects which are general to all
applications. We will discuss these aspects in this section.
Programming the Card Reader
To use the Card Reader with your computer, you must have a driver routine which controls
information flow to and from the unit. If you have pre-programmed software, you should not have
to bother with learning the various program commands. Included in this manual are listings of the
driver routines for the Model II and Model III systems. Detailed information about these routines
can be found in Chapter 5 of this manual.
However, you may have a special need which requires a custom driver. This section shows you the
commands that the Card Reader expects and the format of the information that the Card
Reader returns to the computer.
Card Reader Command Structure
Commands from the computer to the Card Reader are sent in ASCII strings. Each command consists
of three letters. When writing these commands into your custom software, separate each of the
commands by either a single blank space or a semi-colon.. Terminate the string with an |ENTER| .
For example, the following are legitimate command strings (in BASIC):
10 C l $ = "LF0;DFD;PIK" + CHR$(13)
20 C2$ = "STO ASC CFD" + CHR$( 13)
(CHR$(13) generates the ASCII code for |ENTER| .)
Data Format
The data returned to the Computer by the Card Reader is of the general format:
status data block carriage return linefeed*
status consists of one byte of information concerning the operational condition of the Card Reader,
followed by a comma. You may disable the status transmission via a three-letter command in your
software (refer to the STO and ST1 commands) in which case the first transmitted character will
be part of the data block.
data block contains a stream of bytes which constitutes the data on the card. The number of bytes in
the block depends on the format being used at the time.
The data block is followed by carriage return (ASCII code 13). Optionally, you can instruct the unit
via software—(see the LFO and LF1 commands on page 27) to follow the carriage return with
a linefeed instruction (ASCII code 10).
*Note: The Line Feed command is usually optional.
The Card Reader Commands
You can transmit commands to the unit at any time, except during the read operation in the Echo
mode (see page 29 for a discussion of the Echo Mode).
When the Card Reader receives a complete command string (terminated with a carriage return) it
first parses (breaks up) the string into individual commands. If any command is invalid, it returns a
command error to the computer the next time the computer requests status.
Содержание TRS-80 CR-510
Страница 1: ......
Страница 8: ......
Страница 12: ...Figure 7 Baud Rate Switch Positions...
Страница 17: ...Figure 10 Card Specifications Chart 1 3...
Страница 24: ...20...
Страница 34: ...30...
Страница 39: ...35...
Страница 40: ...36...
Страница 41: ...37...
Страница 42: ...38...
Страница 43: ...39...
Страница 44: ...40...
Страница 45: ...4 1...
Страница 46: ...42...
Страница 47: ...43...
Страница 48: ...44...
Страница 51: ...A 1...
Страница 52: ...A 2...
Страница 53: ...A 3...
Страница 54: ...A 4...
Страница 55: ...B 1 Figure B1 General Purpose Card Appendix B Card Specification...
Страница 56: ...B2...
Страница 58: ...C2...
Страница 60: ...D 2 Card Trailing Edge Card Must Be Placed Face Down In the Card Hopper Card Left Card Right...
Страница 63: ......