P
Peter
Guest
I am trying to detect a short (negative) pulse with a PIC (Picaxe).
(Actually it is the input from a keyboard.) Problem is the program is
also doing other things and tends to miss the pulse. So what I want to
do is stretch the pulse and apply it to another input pin on the PIC.
When it detects the longer pulse there it then goes and processes
(multiple) subsequent keyboard inputs on the first pin.
I don't want any complicated circuits, just something simple I can
solder onto the back of an otherwise full board. Will the following
work? Can I simplify it to just one resistor down below? Do I need the
diode?
The top part is existing. ie. the line ie pulled high with the 4k7R
and gets pulled low by the keyboard.
+5
/
\4k7
Keyboard in /
-------.------------'------------- PIC Input
|
|
| +5 +5
| / /
| \ 1M \ 4k7
| / /
'---|<----'---||----'------- Second PIC Input
(Actually it is the input from a keyboard.) Problem is the program is
also doing other things and tends to miss the pulse. So what I want to
do is stretch the pulse and apply it to another input pin on the PIC.
When it detects the longer pulse there it then goes and processes
(multiple) subsequent keyboard inputs on the first pin.
I don't want any complicated circuits, just something simple I can
solder onto the back of an otherwise full board. Will the following
work? Can I simplify it to just one resistor down below? Do I need the
diode?
The top part is existing. ie. the line ie pulled high with the 4k7R
and gets pulled low by the keyboard.
+5
/
\4k7
Keyboard in /
-------.------------'------------- PIC Input
|
|
| +5 +5
| / /
| \ 1M \ 4k7
| / /
'---|<----'---||----'------- Second PIC Input