FSK demodulator in firmware


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,617

    Default FSK demodulator in firmware

    I have what looks to be a 1.6/3.2kHz FSK signal that I'd like to demodulate to a bitstream using a suitable PIC.
    It's a two wire system with bursts of the FSK signal riding on top of the DC supply, so no carrier like with radio.

    Never dealt with FSK signal before so asking if anyone has done anything like this using PBP?


    I'm thinking of using the ZeroCrossingDetector peripheral together with a timer or two. Either just polling the ZCD Out bit and start/stop the timer(s) or possibly tie it in to the timer gate or go the interrupt route. Being such a low frequency signal I think polling will be more than adequate to get started.

    The goal, for now, is "just" to get the signal into a digital bitstream that I can then capture with a logic analyzer. I know this is analog domain stuff, PLL's and such but when all you've got is a hammer (PBP in this case)....

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,166


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    Although it is a low frequency, still a zero cross happens every 156.2 usec for the 3.2KHz signal.

    Will the pic be fast enough to process that signal? I am sure ZCD and timers will be enough, but then you have to do some work in less than that period.

    Ioannis

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,617


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    Plenty fast, I'd say.
    At 32MHz an instruction cycle is 125ns. That's ~1250 cycles between zero crossings.

    I'm not trying to interpret/decode the data, just demodulate the signal.
    Every other zero crossing, grab timer value, do some comparison, flip a bit (or not), reset/restart timer. My gut feeling says we should be able to do that in less than 100 instructions - even with PBP compiled code but we'll see.

    What's "bothering me" is the fact the line is idle for extended periods of time meaning there's no zero crossing and timer will overflow/wrap around. I'll need to detect that.

Similar Threads

  1. RF transmission and FSK modules
    By boban in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 07:19
  2. Replies: 3
    Last Post: - 27th October 2008, 15:08
  3. Firmware only USB (16F84A)
    By shahidali55 in forum General
    Replies: 3
    Last Post: - 23rd September 2008, 12:44
  4. supply FSK COB modules and FSK modules
    By Elsa zhang in forum Adverts
    Replies: 0
    Last Post: - 8th August 2006, 06:40
  5. PicBasic Pro FSK Modem
    By mikep in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th October 2003, 14:21

Members who have read this thread : 3

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts