Hi
I'm having some trouble with my last project: I want to read a clocked signal (data+clock) using interrupts, but due to my little competences I am still having troubles.
The signal is sent in 11-bit packets (8+3), I need to "intercept" them and then transform the data into bytes.
There are no libs for this (and little instructions for using interrupts).
Well, the protocol is PS/2. (Yes, I am trying to build a key sniffer)
Falling edge, I think.
1 start bit, 8 data bits, parity and end, if I remember.
The problem is that I don't know how to use interrupts to capture data.
I found a library, but it doesn't work with recent keyboards (in "sniffer" mode), probably because of the PC, which is connected too.
So I am trying to start from zero, so I can have a better control on the library, and without having functions I don't need.
Already tried a disassembly of the ps2keyboard library with little success (I break at the interrupt process)
That's the point. I want to rewrite the library (I know it's not easy), for having a better control on the code. And because the ps2keyboard library is NOT for intercepting, but it has to be directly connected to the keyboard. Some work and some does not, when the pc is working.
I need to know how to make a working ISR for capturing data with interrupts.
1 start bit, 8 data bits, parity and end, if I remember.
If that is the format of your data then it is not synchronous data, you don't get start bits in synchronous data. That is asynchronous data and what is more it is a NRZ code (none return to zero) so you can't use just interrupts to read it.
AWOL told you how to use interrupts if it is synchronous data and you have two signals.