Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: How works digital input/output on: January 07, 2013, 10:44:04 pm
Keyboard every time is in READ state.

I looked in other people source code it's:

pinMode(irq_pin, INPUT);
digitalWrite(irq_pin, HIGH);
pinMode(data_pin, INPUT);
digitalWrite(data_pin, HIGH);
attachInterrupt(irq_num, interrupt, FALLING);

So I think YES.
Now Arduino can receive data from keyboard.

And now i want to send some data.. So if i want write 1) 2) 3) steps in code I need to write:

1)
digitalWrite(irq_pin, LOW);
delayMicroseconds(100) ;
2)
digitalWrite(data_pin, LOW);
3)
digitalWrite(irq_pin, HIGH) ;

Does I'm correct ?

Just one question. It's INPUT.. how can i send LOW or HIGH. I though it's possible only with OUTPUT.

Thanks.

2  Using Arduino / Programming Questions / How works digital input/output on: January 07, 2013, 10:00:36 pm
Hello,

I'm trying connect Arduino with ps/2 keyboard. Looks like I don't understand how digital input/output works.

I have instructions what to do:

1)   Bring the Clock line low for at least 100 microseconds.
2)   Bring the Data line low.
3)   Release the Clock line.

How to bring Clock line low for 100 microseconds (with functions pinMode and digitalWrite). And how to release clock line ?
Pages: [1]