Re: [iPAQ] Multiple Button Press Detection?

From: Blair Fidler <fidler.a.t.ozy.dec.com>
Date: Thu Aug 17 2000 - 21:58:57 EDT

Tom_Kirksey@ingersoll-rand.com wrote:

> I have been talking with some developers about porting xmame to the iPaq
> and one of them said there is a problem with the buttons on the iPaq.
> Supposedly, only one button press can be detected at one time. So the
> direction indicated by the game pad and a button mapped "fire" could not be
> detected at the same time. Many games will be hard, or impossible to play
> with this limitation.
>
> I searched the mailing list archives and found a mention (possibly) of this
> problem, but no solution. The way I understand it, each button is
> connected to a resistor matrix and each button press is indicated to the
> CPU by 3v minus whatever voltage is dropped across the resistor that button
> is connected to. Each button is represented by a voltage.

This is true. Here are some details from the iPAQ hardware spec
(http://www.handhelds.org/Compaq/iPAQH3600/iPAQ_H3600.html):

1.10.1. Sense voltage level for switches and buttons

Some of the switches or buttons are daisy chained into a resistor network. The
pressing of switch or button are sensed by the voltage level of resistor
network. The voltage step of the ADC is 0.0029V(3.0V/1024).

 Switch No. Name Voltage level(V)
     1 RECORD_SW 0
     2 AP1_SW 0.598
     3 AP2_SW 0.890
     4 AP3_SW 1.167
     5 AP4_SW 1.452
     6 KEY_UP 1.734
     7 KEY_RIGHT 2.017
     8 KEY_LEFT 2.296
     9 KEY_DOWN 2.579

> If this is the case, would it be possible to create "new" events (i.e.
> "Left-Fire", which would be the voltage drop of "left" minus the drop for
> "fire"). This may not be possible, the voltage range tolerance's may be
> too close.

I don't think you necessarily get the difference between the voltage drops. By
pressing two buttons simultaneously you effectively short out the intervening
resistors, so you get a different *divisor* for the ratio.

Since a user wouldn't press two buttons exactly simultaneously, it might be
possible to poll the voltage while a button is being pressed to see whether the
voltage changes after the initial "key down" event. Knowing the old voltage drop
and the new one should tell you which button the user pressed second. (It may
not work for all cases -- there may be some ambigious cases.)

However, the question is whether the Atmel microcontroller gives you access to
the required information. Charlie, does the microcontroller just give down and
up events or can you read the voltage value in between times?

> BTW, I am also working on getting Doom and Gameboy emulation for the Linux
> iPaq. Gmate has Doom and some type of Gameboy emulator running on the Yopy
> and there is a version of Doom
> (http://www.jimmysoftware.com/Software/Doom4CE/index.html) for the HP
> Jornada 820. It runs under CE, but is based on the Linux version of Doom,
> so should be portable to the iPaq.
>
> Cpt_Kirks
>
> _______________________________________________
> iPAQ mailing list
> iPAQ@handhelds.org
> http://handhelds.org/mailman/listinfo/ipaq
Received on Thu Aug 17 18:59:23 2000

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:40 EDT