Hardware Buttons

Started by asianremedy, November 19, 2012, 11:41:06 PM

Previous topic - Next topic

asianremedy

Have a question regarding hardware buttons on OlinuxinoA13:

I want to make a row of buttons which will replicate those on board itself (home, volume up etc etc). As I look into datasheet I see that after pressing a button (for example home button) signal goes to UBOOT through some resistors. Is it an IR simulation or am I wrong? And is it possible to add some more buttons? Thanks

murerten

#1
Hi. I too tried to understand the buttons. This is what I learned so far: There are two ways you can make buttons with supported software (kernel drivers ready). The first is like on A13-olinuxino board. There is 2V input and when you press a button an analog digital conversion takes place. There are two varieties on this one. First 0.2V step and max 8 buttons (as on this board); second 1.4V (I'm not sure) step and max 10 buttons. The alternative is keypad matrix. I don't remember but it is 8x8 I think. But to be sure you can check the A13-sdk. In linux folder there are sunxi driver sources for buttons and keypad. For the method used on this board you can add up to 8 buttons excluding the power and reset buttons and set keys you want in the kernel driver source.

asianremedy

Thanks for this information. Have you tried to add some more buttons? Maybe there's a route to add buttons via IR there's a MOD-IR extension which can be added to the board but I don't know if android image has any codes stored in it.

murerten

No I didn't add buttons. But I changed the Enter button to be Back key (by editing linux driver source). I don't know about the IR extension. If you look into the schema you can check what I explained. I mean the resistive ohm values are calculated so when you press any of the buttons the adc conversion input is multiple of 0.2 volts. If you want to add buttons you can check for the missing multiple of 0.2V in the range 0 to 2V. And then you have to edit the kernel driver source (very easy). And that's it.

asianremedy

Yeah I understand what you mean. I can't trace where this signal goes to, which pin or place (it says uboot on schematics that's it.) In case I know the missing step for example 1.4v or 1.6v where do I connect those additional buttons? Thanks

murerten

If you look at the buttons part on the schema carefully you will see a signal named LRADC near top left. That signal goes to the adc input of cpu. When you press a button it should be multiple of 0.2V. If you want to add more buttons you can look at the A10-olinuxino revA schema. There are more buttons on that schema. And finally I don't know UBOOT. Maybe they wanted Home button to be used to enter to firmware upgrade mode or something. I think that is the reason because when you press it UBOOT signal goes to ground.