Tscope5
|
Definitions of parallel port functions. More...
Go to the source code of this file.
Functions | |
Response registration | |
Parallel port boxes can be used as response devices. See timer.c for more information about response registration. | |
int | ts5_define_parport_button (int device, int button) |
Define a parallel port button as a response button. More... | |
int | ts5_get_num_parport_buttons (int device) |
Get the number of buttons available on a parallel port. More... | |
double | ts5_set_parport_button_debounce_time (int device, double button_debounce_time) |
Set the button debounce time of a parallel port response box. More... | |
double | ts5_get_parport_button_debounce_time (int device) |
Get the button debounce time of a parallel port response box. More... | |
Trigger input/output | |
The parallel ports can be used as trigger input/output devices. See timer.c for more information about trigger input/output. | |
void | ts5_define_parport_trigger_input (int device) |
Define a parallel port as a trigger input device. More... | |
void | ts5_simulate_parport_trigger_input (int device, unsigned char value, double interval) |
Turn on parallel port input simulation. More... | |
double | ts5_set_parport_trigger_debounce_time (int device, double trigger_debounce_time) |
Set the trigger debounce time of a parallel port. More... | |
double | ts5_get_parport_trigger_debounce_time (int device) |
Get the trigger debounce time of a parallel port. More... | |
void | ts5_send_parport_trigger (int device, unsigned char value) |
Send a trigger trough a parallel port. More... | |
double | ts5_set_parport_trigger_output_time (int device, double trigger_output_time) |
Set the trigger output time of a parallel port. More... | |
double | ts5_get_parport_trigger_output_time (int device) |
Get the trigger output time of a parallel port. More... | |
Port settings | |
On older motherboards there were three parallel ports, with addresses 0x378, 0x278, 0x3BC. This is the default setting in Tscope5. On newer motherboards there are no parallel ports, but PCI parallel port cards can be added. If you have such a card, you will need set the number of parallel ports and their addresses using the functions below. | |
int | ts5_set_num_parports (int num_parports) |
Set the number of parallel ports that are connected to the system. More... | |
int | ts5_get_num_parports () |
Get the number of parallel ports that are connected to the system. More... | |
short | ts5_set_parport_address (int device, short address) |
Set the address of a parallel port. More... | |
short | ts5_get_parport_address (int device) |
Get the address of a parallel port. More... | |
Definitions of parallel port functions.
Definition in file parport.c.
int ts5_define_parport_button | ( | int | device, |
int | button | ||
) |
Define a parallel port button as a response button.
device | Number of the parallel port (devices are numbered from 1). |
button | Number of the button (buttons are counted from 1). |
Give a positive number for the button if you want to monitor button press events, a negative number if you want to monitor button release events.
int ts5_get_num_parport_buttons | ( | int | device | ) |
Get the number of buttons available on a parallel port.
device | Number of the parallel port (devices are numbered from 1). |
double ts5_set_parport_button_debounce_time | ( | int | device, |
double | button_debounce_time | ||
) |
Set the button debounce time of a parallel port response box.
device | Number of the parallel port |
button_debounce_time | Debounce time in seconds |
The debounce time is the minimum amount of time between two state changes of the buttons of the box before Tscope5 really counts it as a state change. On some button boxes it is necessary to set this value because the press or release of a button causes a ripple in the electrical current sent to the parallel port (instead of a single state change between on and off).
The debounce time is the amount of time between the press and the release of a button (or vice versa). So the minimum amount of time between two presses (or two releases) will be twice the debounce time set here.
The default debounce time is set to 0.0 (The button boxes at our department have an internal debouncing circuit).
double ts5_get_parport_button_debounce_time | ( | int | device | ) |
void ts5_define_parport_trigger_input | ( | int | device | ) |
Define a parallel port as a trigger input device.
device | Number of the parallel port (devices are numbered from 1). |
void ts5_simulate_parport_trigger_input | ( | int | device, |
unsigned char | value, | ||
double | interval | ||
) |
Turn on parallel port input simulation.
device | Number of the parallel port (devices are numbered from 1). |
value | Input value that has to be simulated (0-255, 0 turns the simulation off). |
interval | Interval in seconds between two triggers. |
double ts5_set_parport_trigger_debounce_time | ( | int | device, |
double | trigger_debounce_time | ||
) |
double ts5_get_parport_trigger_debounce_time | ( | int | device | ) |
void ts5_send_parport_trigger | ( | int | device, |
unsigned char | value | ||
) |
Send a trigger trough a parallel port.
device | Number of the parallel port (devices are numbered from 1). |
value | The trigger value that has to be sent (0-255). |
double ts5_set_parport_trigger_output_time | ( | int | device, |
double | trigger_output_time | ||
) |
Set the trigger output time of a parallel port.
device | Number of the parallel port |
trigger_output_time | Output time in seconds |
The default output time is 0.002 seconds.
double ts5_get_parport_trigger_output_time | ( | int | device | ) |
int ts5_set_num_parports | ( | int | num_parports | ) |
int ts5_get_num_parports | ( | ) |
Get the number of parallel ports that are connected to the system.
short ts5_set_parport_address | ( | int | device, |
short | address | ||
) |