+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Member level 5
    Points: 2,411, Level: 11

    Join Date
    Jan 2005
    Posts
    87
    Helped
    0 / 0
    Points
    2,411
    Level
    11

    Synchronize random data with clock

    hi everyone,

    Qn(a): Can anyone help me with this? I need to synchronize the clock together with asynchronous RS232 data. The clock must be capable of generating a (10khz-16.7khz) frequency and it must be continuously high for at least 50 microseconds before data can be transmitted?(See attachment below)

    Qn(b): How do I sample each data bit at its’middle with respect to the falling edge of the Clock? (See attachment below)

    Thanks.

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 2
    Points: 3,558, Level: 14

    Join Date
    May 2001
    Posts
    136
    Helped
    8 / 8
    Points
    3,558
    Level
    14

    Re: Synchronize random data with clock

    Synchronize something to something asyncronuous... It sounds strange..

    Pls give more details..



    •   AltAdvertisement

        
       

  3. #3
    Full Member level 4
    Points: 4,049, Level: 14
    nandopg's Avatar
    Join Date
    Apr 2001
    Location
    Over the Rainbow
    Posts
    205
    Helped
    8 / 8
    Points
    4,049
    Level
    14

    Re: Synchronize random data with clock

    One way to do what you need is to use an Early-Late Gate, that can be implemented using either analog or digital circuitry.
    You can find the description of this gate in the literature on Digital Communication and on a couple of papers online.

    NandoPG



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 5
    Points: 32,456, Level: 44

    Join Date
    Apr 2002
    Location
    USA
    Posts
    3,942
    Helped
    663 / 663
    Points
    32,456
    Level
    44

    Synchronize random data with clock

    It looks like you simply need a UART receiver, so you don't need precise synchronization. The common technique is to somehow generate a clock (usually by dividing down a crystal oscillator) that runs 16 times faster than the bit rate. Now design some counter logic that waits for the beginning of the start bit, then delays 8 clocks (the middle of the start bit), and then begins sampling the data bits every 16 clocks thereafter until you've sampled all 11 bits. Then check to see if the 11 bits make sense (start=0, stop=1, parity=whatever).

    The values 16 and 8 are mostly arbitrary. For example, you could choose 10 and 5 if that's more convenient for you.



--[[ ]]--