Article
16-Key Input For Msx Micros
This simple ,circuit is an unusual, but interesting, appli- cation of the joystick port available on an MSX microcom- puter. With some modifications, it should also work with other types of computer equipped with a similar "game" input. The use of the joystick port for reading 16 switches is advan- tageous because very little additional hardware is required, and programmers can avail themselves of stan- dard BASIC instructions relating to the joystick. On MSX computers, the pos- ition of the joystick handle is read with the aid of instruction STICK(n), where n is 1 or 2, i.e., the number of the relevant joystick. The instruction returns an integer between 1 and 8, from which the handle position is deduced as shown in Fig. 1. Instruction STRIG(n) enables determining the state of the trig- ger (fire) button on joystick n, and returns -1 when this is actuated. A diode matrix is used here to enable connecting eight pushbuttons Si-S8 to the four direction inputs on the joystick port....
Discussion (0 comments)