8-3
6000 Series user’s manual
Analog I/O
40 CONFIG AIN 3,3: ‘Config A/D channel 3 to -10 to 10V
input range
50 CONFIG AIN 4,0: ‘Config A/D channel 4 to 0 to 5V
input range
60 CONFIG AIN 5,0: ‘Config A/D channel 5 to 0 to 5V
input range
70 CONFIG AIN 6,0: ‘Config A/D channel 6 to 0 to 5V
input range
80 CONFIG AIN 7,0: ‘Config A/D channel 7 to 0 to 5V
input range
100 FOR X=0 TO 5
110 C(X) = AIN(0): ‘Assign analog input readings from
channel 0 to array C
120 NEXT X
Reading numbers less than zero
Do the following to read numbers less than zero:
1. Subtract 65535 (FFFF), then
2. Apply the multiplier.
Configuring analog output
Refer to Table 8-1 to configure for analog output on the 6040 PC
Microcontroller.
Table 8-1
6040 digital to analog output range select: W3
Output range
Channel A
Channel B
0V to 10V
W3[6-8]
W3[3-5]
0V to 5V
W3[8-10]
W3[1-3]
-5V to +5V
W3[7-8]*
W3[3-4]*
* = default, pins jumpered
Note
The 12–bit digital–to–analog converters (DACs) can be jumpered for
different ranges. For example, for a 0 to 10V range, x = 0 implies 0.00V
output; x = 4095 implies 10V output. This means there are 10/4095 =
0.002442 volts per count.
Writing to analog output with CAMBASIC
An analog output program example using CAMBASIC’s AOT statement
is provided below.
10 ‘Assume that DAC jumper is configured to generate
0 to 10V
Summary of Contents for 6000 Series
Page 7: ...Notice to user PC 500 user s manual ...
Page 9: ...About this manual 6000 Series user s manual ...
Page 37: ...2 20 Quick start 6000 Series user s manual ...
Page 65: ...5 16 Serial ports 6000 Series user s manual ...
Page 87: ...6 22 EZ I O 6000 Series user s manual ...
Page 103: ...8 8 Analog I O 6000 Series user s manual ...
Page 119: ...14 2 PC 104 expansion 6000 Series user s manual ...
Page 133: ...16 4 Watchdog timer reset and remote reset 6000 Series user s manual ...
Page 139: ...17 6 Serial EEPROM 6000 Series user s manual ...
Page 157: ...21 2 Software utilities 6000 Series user s manual ...
Page 161: ...22 4 Troubleshooting 6000 Series user s manual ...
Page 177: ...A 16 6010 technical data 6000 Series user s manual ...
Page 215: ...D 16 6040 technical data 6000 Series user s manual ...
Page 229: ...F 2 Miscellaneous 6000 Series user s manual ...