Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: djgpp AT delorie DOT com Date: Tue, 20 May 1997 15:32:58 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Keyboard Leds CC: , alexad3 AT uniserve DOT com Precedence: bulk Hi All: This mail is about the keyboard leds topic. As I wrote the code used by Allegro and I got some questions about how it works (before and now) I put a explanation in my Web. Visit http://www.geocities.com/SiliconValley/Vista/6552/djgpp.html Here I'm replaying to Gregary and putting my opinion about the Alexander code. Gregary J Boyles asked to me: >I tried implementing it exactly as you have done (or very nearly) and it >doesn't work. I have also tried it a number of other ways and it still >doesn't work. I get one of two results. Either the key board hangs and no >longer responds to key presses - it is the key board and not my program. >Or the key board continually interrupts and sends the value 122 to port >0x60 - it still occassionally responds to key presses. You are getting 0xFA, that's the acknowledge from the kbd to your leds command! >Could you please explain to me, in intimate detail the procedure for >changing the LED's. In the 'update LEDs' function you have >'ouportb(0x60,0xFA)' - what does that do? There isn't such a thing, perhaps you mean 0xF4, if that's the case see the explanation. >I can get the 'wait until ready' function to work and I can get the LED's >to change from a test program e.g. outportb(0x60,0xED); delay(50); >outportb(0x60,0x03); but when I try to do it in the test program for my >key board handler it is a dismal failure. Because you must wait the ack. and not a simply delay(50). ----------------------------------------------------------------------------- In other e-mail Gregary showed your code polling the keyboard to read the ack. I don't thing that's a good idea because you'll get the IRQ anyways and the main problem is from where can you call this polling. ----------------------------------------------------------------------------- alexad3 AT uniserve DOT com (Alexander J Russell) exposed a similar code, so the same applies. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013