Yup, this is how I did it last night :). I was trying to decode my samsung
remote. Since I don't have the actual specs of the protocol used I just
figured it out manually. It is
<PREAMBLE><8-bit byte><Complement of 8 -bit byte><1>
I just used the standard all in one receiver and demodulator and fed
the signal directly into the sound card. The sound card seems to be able
to accept a 5 volt signal (though it is probably not recommended). The
resulting waveforem was quite visible and the edges of the samples were
nice and sharp (recorded at 44Khz). Now in order to actually decode this
signal on the fly will require using an i/o port and a timer.
For the samsung format a high is .8ms of 1 followed by 1.5ms of 0 and a
low is .8ms of 1 followed by .5ms low. So to decode:
- set interrupt to trigger on falling edge
- when int occurs start timer & set int to trigger on rising edge
- on rise stop the timer and get the amount of time.
- if it is 1.5ms then it is a 1 else a 0
- start again to get next bit
I am not sure if i explained this very well, but anyway.
Now i have to code the pic software when i get some spare time :)
MD
On Mon, 24 Nov 1997, Mike Keitz wrote:
{Quote hidden}> On Mon, 24 Nov 1997 06:15:51 -0800 Tom Handley <
.....thandleyKILLspam
@spam@TELEPORT.COM>
> writes:
>
> > I'm using the standard Sharp/Radio Shack 40Khz IR front-end. It's
> >one
> >thing to look at the output on the scope and to implement a simple
> >logic
> >analyzer on a PIC or PC... I'd prefer to analyze the codes on the PC.
> >I have a good idea how to do this but I know this has been done
> >before.
>
> I haven't tried it, but I've heard of connecting the IR receiver output
> (maybe through an attenuator) to LINE IN on a sound card. This seems
> like it would work, there may be some artifacts from AC coupling but the
> edges in the signal would still show up. Most software for recording and
> editing with a sound card has an oscilloscope-like display. Some of it
> has accurate time references displayed. I think GoldWave allows you to
> zoom down to a single sample, and displays the exact time.
>