-->
Page 6 of 14

Re: High Frequency pwm?!

PostPosted: Mon Jun 19, 2017 3:52 pm
by schufti
that is definitely not even close, recent clocks only have some 10Hz bandwidth in receiver input

Re: High Frequency pwm?!

PostPosted: Mon Jun 19, 2017 5:25 pm
by urbanze
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!

Re: High Frequency pwm?!

PostPosted: Mon Jun 19, 2017 6:06 pm
by QuickFix
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.

Re: High Frequency pwm?!

PostPosted: Wed Jun 21, 2017 6:46 am
by Dakota
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();

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