Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!eutrc3!eutnv1!camiel From: camiel@eutnv1.UUCP (Camiel Severijns) Newsgroups: comp.sys.hp Subject: HELP needed with GPIO interface Keywords: help, GPIO, handshaking, interfacing Message-ID: <52@eutnv1.UUCP> Date: 5 Jun 89 09:27:53 GMT Organization: Eindhoven University of Technology, The Netherlands Lines: 51 Hello netlanders, We are designing an interface between the 98622A GPIO interface in our HP9000-330 computer (HP-UX 6.2) and a bus system that was developed at our department. We have trouble with the full handshake mode of the GPIO interface. If we execute the following code without linking the dvio library and just after a system boot: #include #include main() { int i; char character; gpio_dev = open("/dev/gpio", O_RDWR); for (i = 0; i < 1000000; i++) { write(gpio_dev, character, sizeof(char)); printf("Character 1 written\n"); write(gpio_dev, character, sizeof(char)); printf("Character 2 written\n"); } close(gpio_dev); } and use a bus monitor to simulate handshaking manually, the first write() doesn't wait for the PFLG to become low but the second does. The bus monitor we use has LED's showing all output lines from the GPIO interface and switches with Schmitt-triggers to control the input lines. It was made according to the spec's in the GPIO manual supplied with the GPIO interface. We have tried a test supplied by the respons center in Amstelveen, the Netherlands. It tests the GPIO interface in PULSE mode by simply connecting the PCTL to the PFLG and setting the correct sense of the logic. This seems to work correctly on the oscilloscope and according to the respons center the GPIO interface should therefore be okay. Can someone help us with this problem ? Has any of you netlanders ever developed an interface for GPIO ? If so, could you tell us how you designed your interface ? Thanks in advance, -- | Camiel Severijns | Dept. of Physics, Eindhoven University of Technology | Den Dolech 2, POBox 513, 5600 MB, Eindhoven, The Netherlands | UUCP: eutnv1.uucp!camiel OR: eutrc3.uucp!tnvscs