Step 1: initialize a/d functions, Step 2: setup integration time – Ocean Optics PC2000-PC_104 User Manual
Page 12
![background image](/manuals/292646/12/background.png)
PC2000-PC/104 Data Sheet
• Operators:
>> bit shift operator
== equal comparison operator
& bit-wise AND operator
^ bit-wise XOR operator
| bit-wise OR operator
One internal pseudo-code function is used --
CheckTriggerMode()
. This function checks the trigger
mode and sets the appropriate spectrometer mode control bits (S0 and S1) in the command sent to the
ADC500/ADC1000 control port. The psuedo-code for this function is:
if trigger_mode = external_synchronization then cmd = cmd | 0x04
if trigger_mode = external_hardware_trigger then cmd = cmd | 0x06
if trigger_mode = software_trigger then cmd = cmd & 0xf9
if trigger_mode = no_trigger then cmd = cmd & 0xf9
Step 1: Initialize A/D Functions
outport_word(baseadd+1,0x0010)
Loads counter 1, which is set to a ~10 msec period.
outport_word(baseadd,0x0002)
Loads counter 0, which is set to 4Mhz
cmd = 0x20
master reset
CheckTriggerMode()
check the external trigger mode
outport_byte(baseadd+4,cmd)
send command to ADC500/ADC1000
delay(10)
delay for 10 msec to allow "settling"
cmd = 0x00
cancel reset and leave disabled
CheckTriggerMode()
check the external trigger mode
outport_byte(baseadd+4,cmd)
send command to ADC500/ADC1000
This function initializes the A/D card. First, the countinuous strobe counter (1) is loaded with a divisor
so that the resulting period is ~10 msec. Next the Master Clock counter is initialized to the fasted
possible value (4MHz). The A/D card is reset and disabled.
Step 2: Setup Integration Time
if dsf < 3 then dsf = 3
make sure integration time is not below the allowable minimum
outport_word(baseadd+2,
dsf)
load counter 2, which defines the integration time
if dsf < 25 then delay(25)
else delay(12*dsf/10)
delay to allow the previous cycle to complete before we start the next
integration cycle
This function sets the integration time of the spectrometer. There must be a delay after this setting to
allow the previous integration period to complete before the new one begins.
12
000-00000-000-05-0704