30
•
Registers Format
3.6 Low-level Programming
To manipulate the ACL-8454, users may understand how to write a
hardware dependant low-level program. The low-level programming
can be carried out by using either assembly or high-level language
such as BASIC or C language. The following gives examples to
show how to use programming language to access an add-on I/O
card.
Getting Start
Before programming, the add-on card should be correctly installed.
After installing the card, the users should already understand how
much system (PC) resources are used by this card, such as I/O
address, IRQ channels, and even DMA channel, etc.
The second step is to study the register format and the operation
theorem of the card. Then users can try to write low-level programs
to operate it. Although the high-level program library is available, the
low-level programming can improve the efficiency and perform
functions which the library does not support. The low level
programming is not difficult and may be necessary to understand.
Programming Language
The programming language to be used is dependent on users'
familiarity and the system requirement. No matter what kind of
language is used, the user must understand the syntax of the I/O
instructions to access the I/O card. The following sections introduce
the syntax of the often used programming language. In each section,
the write (output) port instruction and the read (input) port instruction
are shown. In the examples, the base address of the I/O card is
assume as
HEX 240
and the port of the register to be access is
BASE+2.
Assembly
To write an output port:
out
240h,value
out
240h,register
To read an input port
in
A, 240h
Содержание NuDAQ ACL-8454
Страница 1: ...N u D A Q ACL 8454 MultiFunctions Counter Timer Card User s Guide...
Страница 2: ......
Страница 5: ......
Страница 6: ......
Страница 10: ......
Страница 23: ...Installation 13 reference number of chips and the counters number...
Страница 39: ...Registers Format 29 Bit 7 6 5 4 3 2 1 0 Base 5 DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0...