--- In salva g <> wrote:
>
>
> Hi
> i am working with this code(button sample) but only responds with pins DIO
> nº1,3,5,7 when they are shorted to earth by pin DIO nº2. Why 9,11,13,15 does
> not work?
>
If you read the code, you will see that it sets the lower 4 pins to be inputs
and the upper 4 to be outputs.
The keypad is a matrix of switches so you set one of the outputs high and see
if any of the inputs becomes high. That's how you can connect 16 switches (4 x
4) on 8 (4+4) DIO pins.
>
> *PBDDR = 0xf0; //upper nibble output, lower nibble input
> *GPIOBDB = 0x01; //enable debounce on bit 0
> state = *PBDR; // read initial state
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|