Difference between revisions of "Ramp Generator"
From MCEWiki
Line 1: | Line 1: | ||
+ | * The MCE can be set to write values to internal registers. For arbitrary shapes, see [ Arbitrary Waveform Generator ]. | ||
+ | * Setup for simple ramps is similar to the setup for arbitrary waveforms. | ||
+ | |||
+ | = Commands and Usage = | ||
+ | * Commands: | ||
+ | ** '''internal_cmd_mode (0xB0):''' Enable or disable internal housekeeping/ ramping commands. Default = 0. | ||
+ | *** mode = 0: Disable internal commands | ||
+ | *** mode = 1: Enable Housekeeping commands | ||
+ | *** mode = 2: Enable ramp commands | ||
+ | *** mode = 3: Enable arbitrary waveform (AWG) commands | ||
+ | ** '''ramp_step_period (0xB1):''' Specify the number of frame periods between each ramp step. | ||
+ | ** '''ramp_param_id (0xB5):''' Specify the parameter ID of the register to be ramped. | ||
+ | ** '''ramp_card_addr (0xB6):''' Specify the card address of the register to be ramped. | ||
+ | ** '''ramp_step_data_num (0xB7):''' Specify the number of data that are to be written per ramp command. | ||
+ | |||
+ | * Usage: | ||
+ | wb cc internal_cmd_mode 0 # Disable internal commanding | ||
+ | wb cc ramp_step_period 10 # Period, in internal MCE frames. Don't go too low here. | ||
+ | wb cc ramp_card_addr 2 # Card id (Clock Card, for example) | ||
+ | wb cc ramp_param_id 0x99 # Parameter id (LED, for example) | ||
+ | wb cc ramp_step_data_num 1 # | ||
+ | |||
+ | wb cc internal_cmd_mode 3 //Enable internal AWG commands AFTER writing the data!!! | ||
+ | |||
+ | wb cc data_rate 10 | ||
+ | wb cc ret_dat_s 1 1000 | ||
+ | go cc ret_dat 1 | ||
+ | |||
+ | = Card and parameter addresses = | ||
+ | |||
+ | |||
+ | = Firmware Details = | ||
+ | * Implementation: | ||
+ | ** To enable the AWG internal commands, you set '''internal_cmd_mode''' = 3, as shown in the usage, above. | ||
+ | ** The AWG value is applied immediately following a data packet, and appears in index 7 of the next data-packet header. This index is called "Ramp Value", and is also used to report the ramp value when the MCE is in internal ramp mode (internal_cmd_mode = 2) | ||
+ | |||
+ | |||
* Commands of note: | * Commands of note: | ||
** internal_cmd_mode | ** internal_cmd_mode |
Revision as of 14:41, 22 March 2010
- The MCE can be set to write values to internal registers. For arbitrary shapes, see [ Arbitrary Waveform Generator ].
- Setup for simple ramps is similar to the setup for arbitrary waveforms.
Commands and Usage
- Commands:
- internal_cmd_mode (0xB0): Enable or disable internal housekeeping/ ramping commands. Default = 0.
- mode = 0: Disable internal commands
- mode = 1: Enable Housekeeping commands
- mode = 2: Enable ramp commands
- mode = 3: Enable arbitrary waveform (AWG) commands
- ramp_step_period (0xB1): Specify the number of frame periods between each ramp step.
- ramp_param_id (0xB5): Specify the parameter ID of the register to be ramped.
- ramp_card_addr (0xB6): Specify the card address of the register to be ramped.
- ramp_step_data_num (0xB7): Specify the number of data that are to be written per ramp command.
- internal_cmd_mode (0xB0): Enable or disable internal housekeeping/ ramping commands. Default = 0.
- Usage:
wb cc internal_cmd_mode 0 # Disable internal commanding wb cc ramp_step_period 10 # Period, in internal MCE frames. Don't go too low here. wb cc ramp_card_addr 2 # Card id (Clock Card, for example) wb cc ramp_param_id 0x99 # Parameter id (LED, for example) wb cc ramp_step_data_num 1 # wb cc internal_cmd_mode 3 //Enable internal AWG commands AFTER writing the data!!! wb cc data_rate 10 wb cc ret_dat_s 1 1000 go cc ret_dat 1
Card and parameter addresses
Firmware Details
- Implementation:
- To enable the AWG internal commands, you set internal_cmd_mode = 3, as shown in the usage, above.
- The AWG value is applied immediately following a data packet, and appears in index 7 of the next data-packet header. This index is called "Ramp Value", and is also used to report the ramp value when the MCE is in internal ramp mode (internal_cmd_mode = 2)
- Commands of note:
- internal_cmd_mode
- ramp_step_period
- ramp_min_val
- ramp_step_size
- ramp_max_val
- ramp_param_id
- ramp_card_addr
- ramp_step_data_num