Receiving asynchronous data bursts

[Johan's] been working on a chunk of code for about seven years and he thinks it’s ready to help you with your next project. He calls it D1 (The One) and it lets you receive asynchronous data without the need for a hardware USART. It’s capable of working with signals from an IR or RF remote, as well as tangentially related transmissions like RFID and magstripe readers.

It uses timer and port interrupts to sample the incoming data. Once it’s captured a transmission, the code sets a flag so that you can pull what it got into your own application. If you’re expecting to receive a protocol that sends packets several times in a row a verification module is also included which runs as a precondition of setting the received flag. The package is written in PIC assembly, but with all the information that [Johan] included in his post this shouldn’t be hard to port over to other chip architecture.

Comments

  1. munch says:

    Seven years? Commodore has him beat by more than a few years. IEC bus anyone? ;)

  2. Kemp says:

    Not meaning to insult here, but seven years to implement bit-banging and a lookup table? Maybe the writeup doesn’t do it justice.

    • R says:

      That was my first thought, but I suspect it’s one of those on again, off again type projects. That said, it looks like he was pretty thorough – I imagine it would have taken him a month or two if he worked solidly at it.

  3. RunnerPack says:

    He said it took “several” years, not seven.

    Looks like a handy tool for all kinds of situations. It’s definitely getting a bookmark.

  4. vonkonow says:

    Rotfl, no, it’s not seven years full time work ;)
    But it is a project that has been used in many projects over several years and has been modified and improved over the time.

    I think the best feature is that you easily can control how the data is sampled. In the automatic mode the pulse length is automatically adjusted during sampling. It detects IR transmissions without the need to know the protocol or timings.

    I plan to post some examples in the future showing how it works. I think the most interesting one is when I replaced the chip in a low cost radio controlled power switch to support features that exists in much more advanced solutions. I have also used it for an IR to RF translator, learning and detecting one protocol and transmitting another.

    • Kemp says:

      The mini-writeup here didn’t do you justice then :) Actually, I didn’t have a lot of time to read through your documentation at the linked page, so I just scan-read. Unfortunately, it was hard to pick out the exciting parts like the automatic sampling period adjustment and so on. It sounds a lot more interesting now, I’ll have to remember to make the time to explore it properly.

    • neirons says:

      It would be nice to pick some examples, cause hard to understood how to use in main application.
      We wait for that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,560 other followers