>"I am doing a project which is relevant to gameport interface. I face >the problem on reading analog input. One end of the potentiometer is >connected to +5V pin and the center pin is connected to analog pin of >the gameport. I do not use any joystick to test my gameport. I connect >the potentiometer to the gameport directly. However I don't know how to >read the value of analog input by using program written in Visual Basic. >Besides that, I have download a joystick test program called Jcenter.exe >from CH product. I am not really understand how it works. Does anyone >know about it or any source code that I can refer to? " >regards, >Donny Tan >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body To James Newton, PICList.com webmaster: Isn't it a time to put a text "Look over MSDN first" as a bottom banner in place of "Going offline? - SET PICList DIGEST " - the option seems to be switched off. To Donny Tan: Ask James Newton; Battling for years with MS software, he had become a MS software guru. On the subject: --- First approach: Get documentation on "Platform SDK:Microsoft DirectX 8.0 (Visual Basic)" In a section "Direct Input Visual Basic" you can find all you want. --- Second approach: Get documentation on "Platform SDK:Windows Multimedia": The joyGetPosEx function queries a joystick for its position and button status The joyGetDevCaps function queries a joystick to determine its capabilities. How to handle them from VB look: "Joystick.exe Calls the Joystick API Functions" I was involved with the both approaches. Them worked fine. ----------------------------------------------------------- I'd rather change [OT] to [EE] for this mesage, because PIC are the right tool to be used in emulating a variable resistor in a joystick and in emulating a keyboard to construct a really cool game input device. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body