Hi and thanks for taking the time to read this.
I am in the process of creating an MSF clock using my nice new MBed but am experiencing some problems I can't figure out.
For those of you that don't know what MSF is please take a look at:-
http://en.wikipedia.org/wiki/Time_from_NPL
I originally wrote a clock to decode the MSF signal in assembler for a PIC Microcontroller and didn't have any problems but on the MBed I am having what appear to be stability issues decoding the signal.
My main() function only contains clock initialization code and the ISR samples the input data, checks it for errors and updates the MBed RTC if the received data contains no errors at the end of the minute.
The MSF receiver is connected to (p5) and simply outputs a TTL level indicating whether or not the radio carrier is on or off.
I realise a lot more info is required in order to help me with code specifics but my initial question is how accurate is the 100Hz interrupt likely to be given there is quite a bit of code in the ISR but should be easily executable in the time required.
The interrupts are started like this.
Ticker timer;
void timerInt() {
....
....
}
int main() {
timer.attach(&timerInt, 0.01);
lcdDisplay.cls();
while (1) {
wait (5);
}
}
Regards
Lynton
Hi and thanks for taking the time to read this.
I am in the process of creating an MSF clock using my nice new MBed but am experiencing some problems I can't figure out.
For those of you that don't know what MSF is please take a look at:-
http://en.wikipedia.org/wiki/Time_from_NPL
I originally wrote a clock to decode the MSF signal in assembler for a PIC Microcontroller and didn't have any problems but on the MBed I am having what appear to be stability issues decoding the signal.
My main() function only contains clock initialization code and the ISR samples the input data, checks it for errors and updates the MBed RTC if the received data contains no errors at the end of the minute.
The MSF receiver is connected to (p5) and simply outputs a TTL level indicating whether or not the radio carrier is on or off.
I realise a lot more info is required in order to help me with code specifics but my initial question is how accurate is the 100Hz interrupt likely to be given there is quite a bit of code in the ISR but should be easily executable in the time required.
The interrupts are started like this.
Ticker timer;
void timerInt() {
....
....
}
int main() {
timer.attach(&timerInt, 0.01);
lcdDisplay.cls();
while (1) {
wait (5);
}
}
Regards
Lynton