diff options
-rw-r--r-- | bus.c | 3 | ||||
-rw-r--r-- | bus.h | 1 | ||||
-rw-r--r-- | gpib.c | 7 |
3 files changed, 10 insertions, 1 deletions
@@ -356,7 +356,8 @@ static unsigned gpio_pins[] = { GPIO0_X + 22, // i.e., GPIO0_22 GPIO1_X + 15, // i.e., GPIO1_15 GPIO1_X + 14, GPIO0_X + 27, - GPIO1_X + 12 + GPIO1_X + 12, + GPIO2_X + 1 }; @@ -19,6 +19,7 @@ #define OUTPUT_RELAY 4 /* output enable/disable relay */ #define PW_ENABLE 5 /* TTL enable/disable output */ #define POWER_FAIL 6 /* pulled low if +24V OK, pulled high if power fails */ +#define RST_GPIB 7 /* don't use SYS_RESETn for this purpose - unpredictable */ // A5, A6 used to select chips #define Octal_DACportCS_low 0x00 @@ -413,6 +413,13 @@ static void TNT_Gen_Error(int code) /*----------------------------------------------------------------------------------------------------------*/ void GPIB_initialize(void) { + // The RST_GPIB pin should already be low - defaults to low at + // power on. + bus_setpin(RST_GPIB, 0); + g_usleep(1); + bus_setpin(RST_GPIB, 1); + g_usleep(100); + INTERFACE_STATUS=0; /* Initialize Globals to zero */ INTERFACE_ERROR=0; DATA_COUNT=0; |