+ Reply to Thread
Results 1 to 12 of 12

Thread: MSF / DCF decoding query,

  1. #1
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default MSF / DCF decoding query,

    Is the output from the DCF time signal the same as the MSF one?
    I.E will software written for a DCF receiver work when attached to an MSF receiver


  2. #2
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,859
    Blog Entries
    13

    Default

    Quote Originally Posted by karenhornby View Post
    Is the output from the DCF time signal the same as the MSF one?
    I.E will software written for a DCF receiver work when attached to an MSF receiver
    hi,
    The format is different, look a this link:

    DCF Signal coverage
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  3. #3
    picasm Good picasm Good
    Join Date
    Sep 2006
    Location
    UK
    Posts
    358

    Default

    As Eric has said, the time code is different, here is the DCF77 time code info:
    Physikalisch-Technische Bundesanstalt (PTB)

    The MSF time code info is available as a PDF document here:
    MSF Radio Time Signal : Products & Services : Time : Time & Frequency : Science + Technology : National Physical Laboratory

  4. #4
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default

    Thanks, Ive managed to get some useful info out of them
    What I've discovered "so far" is that the DCF signal output THIS:
    Code:
     Bit    Name    Description        Comment 
    0-14           Reserved           Coding to requirement 
    15     R       Send antenna       0 = Standard antenna / 1 = Reserve antenna 
    16     A1      Announcement 1     1 = Next hour a Daylight Saving Time (DST) change occurs 
    17     Z1      Time Zone bit 1    0 = Winter / 1 = Summer (DST) 
    18     Z2      Time Zone bit 2    0 = Summer / 1 = Winter (usually the opposite of Z1) 
    19     A2      Announcement 2     1 = Next hour an extra second is inserted (leap-second) 
    20     S       Startbit           Always 1, startbit coded time information 
    21-27          Minutes            7 bit, BCD, LSB first (00...59) 
    28     P1      Parity bit 1       Even parity for all received bits from the minutes 
    29-34          Hours              6 bit,BCD, LSB first (00...23) 
    35     P2      Parity bit 2       Even parity for all received bits from the hours 
    36-41          Day of the month   6 bit, BCD, LSB first (01...31) 
    42-44          Day of the week    3 bit, BCD, LSB first (1 = Monday...7 = Sunday) 
    45-49          Month 5 bit,       BCD, LSB first (01...12) 
    50-57          Year 8 bit,        BCD, LSB first (00...99) 
    58     P3      Parity bit 3       Even parity for all received bits from the date
    
    i'm guessing the bit numbers above are whats transmitted in those actual seconds?


    While the MSF receiver module I have (and want to use) the only info I have to the outputs are:
    Code:
     Taken from the PDF file the ONLY info relating to the data output pins:
    Serial Output
    This port can be used for connecting external units, like. digital displays.
    Available information:
     Actual year
     Actual month
     Actual day
     Actual day of the week
     Actual hour [12h]
     Actual AM/PM
     Actual minute
     Actual second
    The transmition always happens on the begining of every hour, at
    HH:00.00,500 and takes 44 ms.
    Additional transmitions will happen after „first receive“, „forced receive“ und „auto
    receive“ and after any correction of the hands was necessary.
    
    Specification Date: 09.03.2005
    MSF RC_wallclockDO_Specification
    2.7.1. Format of data
    Nr. Describtion Format Numbers Explanation
    1 daylow   BCD 00 - 31 Lower byte of actual day
    2 dayhigh  BCD 00 - 31 High byte of actual day
    3 dayofweek HEX 1 - 7 Day of the week, 1 = monday
    4 month    HEX 1 - 12 Actual month, 1 = January
    5 yearlow  HEX 00 - 63 Actual year, 14H = xx20
    6 yearhigh HEX 00 - 63 Actual year, 14H = xx20
    7 minutelow  BCD 0 - 9 Actual minute, 0 - 9
    8 minutehigh BCD 0 - 5 Actual minute, 10 -50, 0xxx = AM, 1xxx = PM
    9 hour HEX 0 - 11 Actual hour
    10 secondlow  BCD 0 - 9 Actual second, 0 - 9
    11 secondhigh BCD 0 - 5 Actual second, 10 -50
    
    
    The transmition is serial, sychronized to a clock-frequency of 1 kHz. The clock frequency is
    also available on the port. 
    Timing diagram:
    clock pin … 1
    data pin ... 2
    First nibble Second nibble Third nibble Fourth nibble ...
    daylow = 0101B =5 dayhigh = 0010H =2 dayofw. = 0011H =3 month = 1011H =11 ...
    Beispiel: 25. Nov. Mittwoch
    Example: Nov. 25th Wednesday
    
    I've got an example of a basic program to decode the German DCF signal but it's in proton basic while I'll be using picbasic pro, which isn't a problem I can figure out how to convert it ok
    What i could do with some help on is, any ideas what bits I need to change in the code to get the msf module decoding?
    i.e the main differences I need to look out for or work on changing
    I've never done anything with clocks before, and never used a serial input to a pic either so any ideas are welcome

  5. #5
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,859
    Blog Entries
    13

    Default

    hi,
    Look here:
    The site has a link to a program, 'Oval'

    A Rugby MSF Atomic Clock interface
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  6. #6
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default

    Quote Originally Posted by ericgibbs View Post
    hi,
    Look here:
    The site has a link to a program, 'Oval'

    A Rugby MSF Atomic Clock interface
    thanks, had a look and it's quite impressive, however the interface is for attaching to a computer and there is no "program" as such (that I can see?)
    What I'd like is hints on how to make a pic decode the msf signal and display it on an lcd

  7. #7
    picasm Good picasm Good
    Join Date
    Sep 2006
    Location
    UK
    Posts
    358

    Default

    Quote Originally Posted by karenhornby View Post
    What i could do with some help on is, any ideas what bits I need to change in the code to get the msf module decoding?
    Your MSF receiver appears to also have a built-in decoder like this:
    http://www.u-t-s.de/PDF_Daten/583374...cification.pdf

    So now it looks like it is outputting the time data in a proprietary serial protocol - not the raw MSF time codes that are documented.

    Looking at the data sheet, it uses 1khz clock pulses to sync the data bits.
    Just as the clock pulse goes from high to low would be a good time to sample the data pin.
    A low = 1 and High=0. As it arrives serially so you will need to shift the bits into 4 bit nibbles and in some cases as the values are in hex and others it is in bcd so you may need to convert between hex - bcd depending on what you want to do with the data.

    I don't know how you would do it all in Basic as I rarely use it, I prefer asm.

  8. #8
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default

    Quote Originally Posted by picasm View Post
    Your MSF receiver appears to also have a built-in decoder like this:
    http://www.u-t-s.de/PDF_Daten/583374...cification.pdf

    So now it looks like it is outputting the time data in a proprietary serial protocol - not the raw MSF time codes that are documented.

    Looking at the data sheet, it uses 1khz clock pulses to sync the data bits.
    Just as the clock pulse goes from high to low would be a good time to sample the data pin.
    A low = 1 and High=0. As it arrives serially so you will need to shift the bits into 4 bit nibbles and in some cases as the values are in hex and others it is in bcd so you may need to convert between hex - bcd depending on what you want to do with the data.

    I don't know how you would do it all in Basic as I rarely use it, I prefer asm.
    You're right
    that is the actual module.
    So all i need to do is decode the serial data? umm this might seem a stupid question but whats the difference between a bit and a nibble? sorry for asking what to most is probably a simple thing

  9. #9
    picasm Good picasm Good
    Join Date
    Sep 2006
    Location
    UK
    Posts
    358

    Default

    I have just looked at a datasheet for PICs that have a hardware USART such as the 16f628 and I think it "may" be possible to use it's synchronous serial reception mode to handle the data reception rather than doing it in software only.

    The only problem is the 1Khz synchronous baud rate is very slow and non-standard and it may only be configurable when using a PIC clock of 1Mhz or lower according to the data sheet.

    (A nibble is 4 bits or half of a byte)
    Last edited by picasm; 2nd June 2008 at 08:40 PM.

  10. #10
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default

    Thanks
    any info is greatly appreciated.
    My only experience of pic's so far is to connect to an lcd, incorporate a temp sensor and display the temp and basic on off switches so this is all new to me

  11. #11
    David James Good David James Good David James Good David James Good
    Join Date
    Jul 2007
    Location
    East Yorkshire, UK
    Posts
    53

    Default

    This probably won't help you, but just on the offchance, Simple Radio Clock for PC's shows assembly details for a clock receiver for either MSF or DCF.

    It includes C source code for a linux program that understands MSF, DCF, and WWVB time signals.

  12. #12
    karenhornby Good karenhornby Good
    Join Date
    Feb 2008
    Posts
    101

    Default

    Quote Originally Posted by David James View Post
    This probably won't help you, but just on the offchance, Simple Radio Clock for PC's shows assembly details for a clock receiver for either MSF or DCF.

    It includes C source code for a linux program that understands MSF, DCF, and WWVB time signals.
    unfortunatly I dont know "C" at all, I only know basic.
    But all i have to do it seems is learn how to interpret a serial output and decode it as the data is a simple 1Khz data stream aparently

+ Reply to Thread

Similar Threads

  1. tv remote decoding
    By raviram87 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 0
    Latest: 28th December 2007, 04:27 PM
  2. RF decoding with PIC
    By Spectacular Butter in forum General Electronics Chat
    Replies: 7
    Latest: 20th November 2004, 01:48 PM
  3. Decoding IT TV Remote Signals
    By Timmymna in forum Micro Controllers
    Replies: 4
    Latest: 21st May 2004, 04:32 PM
  4. Can a bs2pe decoding parity?
    By egg0900 in forum Micro Controllers
    Replies: 0
    Latest: 30th March 2004, 04:04 AM
  5. Decoding a JK Flip Flop
    By Deathshead in forum Electronic Projects Design/Ideas/Reviews
    Replies: 3
    Latest: 4th February 2004, 04:30 AM

Tags for this Thread