PC keyboard & Mouse

ZXNet echo conference «hardware.zx»

From Alex Udotoff To All 19 August 2002

Greetings, All! Maybe someone will throw in a diagram of the subject controller or At least give me a hint on how to do this thing? With best wishes, Alex Udotoff.

From Valerij Kozhevnikoff To Alex Udotoff 23 August 2002

Hello Alex! 21 Aug 02 00:35, Kirill Frolov -> Alex Udotoff: AU>> Maybe someone will throw in a diagram of the subject controller or KF> Not in free distribution. Why not? The circuit from the ATM turbo can be used, there is also a controller there yes. I was inspired to gut Zonov’s subject controller, I’m sitting here drawing evo diagram. I'm already tired, dammit... KF> I exclude Lomov’s scheme as unnecessarily complex. It's not that complicated. Z80, 8 KB ROM, 1 KB RAM and bulk. And processor She doesn't seem to be white. By the way, probably the simplest one is the circuit for the XT keyboard from ZXNext. There from everything good only 4Kb ROM and a little bit of bulk. But she has a drawback - more You can’t press one button at the same time (except for shift, of course). I have one like this I have it as a spare, but I gave the diagram to one character to look at and that’s it no time to pick it up. It's been a year now. :( By the way, it’s on the Internet somewhere. Could anyone tell me the URL... S? AU>> at least hint how to make this thing? KF> On the microcontroller. It's easier with a mouse - there are several circuits on PICs. Looks like it's loose too were. WBR, Jason. /*e-mail: jason2000(scary dog)yandex.ru ICQ: 62235830*/ /np:/ *silence*

From Valerij Kozhevnikoff To Max Harchenko 31 August 2002

Hello Max! 30 Aug 02 10:10, Max Harchenko -> Valerij Kozhevnikoff: MH>>> I have a diagram for connecting an XT keyboard. VK>> Let's show you. MH> Flew to uue. I looked. I have a diagram also from Profi, but drawn more clearly. Yes in TXT and TIF. Well, and the firmware for it. I've been thinking about this. The XT keyboard outputs bytes in serial form on the DATA line, gating each bit on the CLK OUT line. AT keyboard outputs bytes via the DATA line using the RS-232C protocol at speed 2400 baud, 1-8N-1, that is, one start bit, eight data bits, one stop bit, no parity. The CLK IN line is supplied with who knows what clock frequency from the computer. It’s enough to just convert the prof controller to AT... I liked the ATM controller. ······------====== Monitor glass cutter ======------······ Now there will be “hidden” ports that are hidden in TR-DOS: #FF77 - system port - [the hamster ate it] D6 and D7 respectively - for 6.40 - AD_KEY and K_RES signals for programming the XT keyboard - AD_KEY - switching between ADC and keyboard. K_RES - reset interrupts from the keyboard... for 7.10 - respectively, signals VE1(=1 - prohibition of operation of 8031 (all requests go to the zx-keyboard)) and VE0 (not used, required by defaultset to 1) - control of the upgraded XT-keyboard controller. Through this controller, work with RS-232 is also carried out. [the hamster ate it] Further other ports - out #FFE7 - only for 6.40! WCSF signal - writing to special RAM XT keyboard (537RU10) (not located in the Z80 address space) D0-D4 - data. A8-A15 + K_RES signal from port #FF77 - keyboard RAM address. At 7.10 - not used. [the hamster ate it] Controlling the XT(AT) keyboard on TURBO 2+ (fees 7.00-7.10) Starting with version 7.00, ms appeared on the computer. 8031, which is radical changed the operation of the #FE port and made it possible to connect an IBM XT keyboard (or modern AT keyboard - you just need to install a different ROM firmware). When trying to read the contents of the keyboard, the processor issues the command IN A,(#FE), special platoon trigger and the processor is stopped by the WAIT signal. At the same time, in The 8031 microcontroller generates an interrupt. After the necessary procedures translation of address lines, the microcontroller outputs to the processor data bus keyboard state, the WAIT signal is reset and the processor continues its work. The presence of 8031 and an extended keyboard (101 keys) allows How to simplify keyboard polling in CP/M to just reading code keys, however, this required the introduction of additional commands to control the 8031, and since the only possible waytransfer data to 8031, this is the state of the high half of the Z80 address bus at the moment reading port #FE, this method is used. Keyboard control sequences: _#55_ - indicates that the next byte is a code keyboard commands. In response, the keyboard returns the code #AA - this is possible use to check the presence of 8031. LD A,#55 IN A,(#FE) CP#AA JR NZ,NO_XT LD A,COMM ;command (see below) IN A,(#FE) LD A,ARG1 ;additional parameters (may be missing) IN A,(#FE) LD A,ARG2 ;additional parameters (may be missing) IN A,(#FE) _#00_ - Reads the code of the pressed key. XOR A IN A,(#FE) ;in the battery there is a key code (the list of codes is given below) _#80_ - reads the 1st byte of keyboard flags LD A,#80 IN A,(#FE) _#40_ - reads the 2nd byte of keyboard flags LD A,#40 IN A,(#FE) Command codes (Attention! Before writing the command code, you must give the control code _#55_ to put the 8031 into command input mode): #01 get 1 byte of the program version number #41 get 2 bytes of the program version number #81 get 3 bytes of the program version number #C1 get 4 bytes of the program version number #07 erase keyboard buffer and all flags #08 DATA operating mode setting: bit 0.1 - operating mode is set 0 - Sinclair keyboard emulation 1 - read key code (flags are not processed) 2 - CP/M mode 3 - direct reading of code from the keyboard's serial portbit 7 - mode 0-lat 1-rus (only for CP/M) #09 get the contents of memory location 1 #49 get the contents of memory location 2 #89 get the contents of memory location 3 #C9 get the contents of memory location 4 #0A will switch to Russian letter input mode #0B will switch to Latin letter input mode #0C program pause #0D restarting the computer #10 get seconds #50 get minutes #90 get a watch #11 DATA set seconds #51 DATA set minutes #91 DATA set clock #12 get a number #52 get a month #92 get a year #13 DATA set number #53 DATA set month #93 DATA set year #14 DATA forces some signals (set occurs if the corresponding bit is 1) bit 0 = 0 bit 1 = 0 bit 2 = 0 bit 3 DTR (RS-232!) bit 4 RTI (RS-232!) bit 5 = 0 bit 6 = 0 bit 7 = 0 #15 DATA forcefully resets some signals (reset occurs if the corresponding bit is 1 (see com #14) #16 read the contents of port P3 bit 0 - bit 1 - bit 2 - bit 3 - bit 4 VE1 bit 5 - bit 6 - bit 7 - #17 read RS232 status bit 0 CD bit 1 CTS bit 2 RI bit 3 - bit 4 - bit 5 - bit 6 - bit 7 - ······------====== Monitor glass cutter ======------······ There is a circuit diagram of the computer itself, the controller is on board. WBR, Jason. /*e-mail: jason2000(scary dog)yandex.ru ICQ: 62235830*/ /np:/ *silence*