I have written a sketch which uses the DCF77 library from Thijs Elenbaas to decode a DCF77 encoded pulse train carrying time signals and take some action with the resulting time value. The code works very well and does exactly what I need when compiled for the Arduino Nano. I have been using the Nano as the target as I have several and it is convenient, but the actual target processor is a Due which is built in to some hard to access equipment.
However when I move to compiling for the Due, though the code compiles and uploads fine it does not work! I am using exactly the same input pins, the same code and libraries, just compiling for a different board. I am at a loss to know what to do to make progress.
So my question, are there particular programming aspects or details of libraries that are different between Nano and Due please? I am using DCF77 and TimeLib.
Yes.
The timers and interrupt structure are totally different on the two processors. I would be surprised if it did work. Either contact the writers of this library to see if they have a Due compatible version or look for another library.
One word of caution, The Due is a 3V3 processor so make sure your input DCF77 encoded pulse train, is not at the 5V level or you will damage the Due.