Changes

Jump to navigation Jump to search
453 bytes added ,  06:22, 5 November 2009
no edit summary
Line 3: Line 3:  
The DAC Programmer assigns DAC voltages according to the mask and values listed in the P-packet payload. The module always passes control to the Transmitter to send a D-packet, confirming the requested values.
 
The DAC Programmer assigns DAC voltages according to the mask and values listed in the P-packet payload. The module always passes control to the Transmitter to send a D-packet, confirming the requested values.
   −
The mask selects which channels must be altered. Any channel that is to be reprogrammed will have a 1 in the corresponding location, and any channel that is to be left alone will have a 0 in the corresponding location.  The MSB of the first byte will be channel 0  and the LSB of the fourth byte will be channel 31.  Thus, if only channels 14 through 26 are to be programmed, the mask would contain:
+
The mask selects which channels must be altered. Any channel that is to be reprogrammed will have a 1 in the corresponding location, and any channel that is to be left alone will have a 0 in the corresponding location.  The MSB of the first byte will be channel 0  and the LSB of the fourth byte will be channel 31.  Thus, if only channels 5 through 17 are to be programmed, the mask would contain:
 
{| align="center" cellpadding="4" border="0" cellspacing="0" style="text-align:left"
 
{| align="center" cellpadding="4" border="0" cellspacing="0" style="text-align:left"
 
! First data byte
 
! First data byte
Line 23: Line 23:       −
The Programmer is one of the more complex modules. There are two stages involved in its process: mask and data. The first stage involves reading and storing the 4-byte mask (32-bits corresponding to 32 channels of the DAC), which follows immediately after the location and type bytes of the P-packet payload. Then the Programmer steps through the rest of the P-packet in 2-byte words, each containing the 14-bit DAC voltage, ordering write operations via the [[Programming_the_DAC|DAC Controller]] for each one. The packet is expected to have all 32 values in ascending order of channels. For any channels that need not be altered or to avoid writing to unused channels of the DAC, the mask must contain 0's for the corresponding bits. The [[FPGA_Registers#DAC Register|DAC Register]] is pulsed simulataneously with the DAC controller to record the programmed value. The will later be sent back to the PC for confirmation. (No feedback from the DAC chip itself is possible. Some channels may be sampled by the ADC if necessary.)
+
The Programmer is one of the more complex modules. There are two stages involved in its process: mask and data. The first stage involves reading and storing the 4-byte mask (32-bits corresponding to 32 channels of the DAC), which follows immediately after the location and type bytes of the P-packet payload. Then the Programmer steps through the rest of the P-packet in 2-byte words, each containing the 14-bit DAC voltage, ordering write operations via the [[Programming_the_DAC|DAC Controller]] for each one. The packet is expected to have all 32 values in ascending order of channels. For any channels that need not be altered the mask must contain 0's for the corresponding bits. If a requested value exceeds the voltage level hardwired into the FPGA firmware, this maximum value is set instead of that requested by in the P-packet. The responding D-packet will reflect this correction.
 +
 
 +
The [[FPGA_Registers#DAC Register|DAC Register]] is pulsed simultaneously with the DAC controller to record the programmed value. These will later be sent back to the PC for confirmation. (No feedback from the DAC chip itself is possible. Channel 31 is reserved for calibration and is connected to ADC channel 7.) Because the combined duration of these operations exceeds the reception time of the minimum-length packet, the module inhibits the Receiver Interface of the Ethernet Controller for the duration of the programming to prevent incoming packet pileup and receive buffer overload.
     
1,004

edits

Navigation menu