18
•
Low-Level Programming
Example:
Converted Data =500
Binary Code
=1001 1111 0100
Vref
=-5V
V.OUT
=-(-5 V) * ( 500/ 2047) = 1.221 V
3.4 D/A Conversion Sequence
In ACL-6128, the A/D conversion can only be controlled by software
based on
double buffering concept.
That is, the converted data should
be stored in High Byte Register first, and then stored the Low Byte
Register.
The procedures of how to initiate and convert digital data to analog
output is listed step by step below:
1.
Define the base address of ACL-6128 card
e.g.
Base_Addr = 0x2C0;
2.
Extract the most signification 4 bits from the converted data, and then
written to Bas 0
e.g.
High_Byte = Data & 0f00;
outportb( Bas 0, High_Byte);
3.
Extract the least signification 8 bits from the converted data, and then
written to Bas 1
e.g.
Low_Byte = Data & 00ff;
outportb( Bas 1, Low_Byte);
An example program in low-level programming style called 6128IO.C is
included in the Utility and Software Library diskette for your reference.
Содержание ACL -6128
Страница 1: ...N u D A Q A C L 6 1 2 8 2 Channel Isolated 12 bit Analog Output Card U s e r s G u i d e...
Страница 4: ......
Страница 8: ......
Страница 33: ...Calibration 25...