Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

PS/2 Keyboard (again)

2007-04-03 by Alex De Lara

Sorry I post such similar question but cannot figure out a good answer:

From the ATMEL app note, it is suggested to implement a PS/2 keyboard
interface using INT0 (keyboard clock) and any other port (data line).

Using this schema, the data value is sampled and stored are every
leading edge of the clock signal.
At the end one has the byte assembled and can decode it.

So... what is happening here is that the software is doing the 
work of an interface serial.

The question I cannot see a good answer for yet is : 
 - why not use one of the USARTS of the ATmega128 provides 
    (that's what I am using) and let the internal atmel 
    hardware assemble the byte and generate to me an interrupt 
    when the byte is ready to be decoded ?

Unless the USART is way too slow, then, what is the benefit ?

Thanks you all.

-Alex

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.