Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)
User avatar
By urbanze
#67374
Dakota wrote:I need a 77.5 khz for a DCF77 atomic clock transmitter, but I don't find any info :-(

viewtopic.php?f=13&t=15225


this frequency you can do with timer! Max can i get is 230KHz.

use OS_TIMER_US or TIMER1 to do an ISR and make this! if you can't do this, tell us!
User avatar
By QuickFix
#67378
urbanze wrote:
Dakota wrote:I need a 77.5 khz for a DCF77 atomic clock transmitter, but I don't find any info :-(

this frequency you can do with timer! Max can i get is 230KHz.

In my opinion there's no sense in creating some sort of DDS, since the DCF-signal must be highly accurate (crystal accurate or better if possible).
You're better off with a 77.5 kHz oscillator, (ASK) modulating at 1 bit/sec with a bitstream encoded with the correct time code data.
User avatar
By Dakota
#67432 Thank a lot for your answer. I make this piece of code , it seems to work in a ESP8266 (Lolin nodemcu v3)
It give a 77.5 khz signal ( a lot of noise at least in my radio receiver XDD , I have not any oscilloscope :? )
but my clock does not syncronize, it does not work :cry: :cry: :cry:

Antenna is pin D8
-----------------------------------------------------------
#define Antenna D8
unsigned long frec = 80000000L / 77500 ;
volatile unsigned long next;

boolean TickTock = false;

void inline radioISR(void){

TickTock = !TickTock;
digitalWrite(Antenna,TickTock);
timer0_write(ESP.getCycleCount()+frec);

}

void setup()
{

noInterrupts();
timer0_isr_init();
timer0_attachInterrupt(radioISR);
timer0_write(ESP.getCycleCount()+frec);
interrupts();

}
----------------------------------------------------------------