Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Dakota
#67288 I want to adapt a DCF77 radio transmiter in 77.5 khz from Arduino to ESP8266
it use timer registers but I can't find how to translate it from Arduino to ESP ... ocoll_.ino

Everything compiles ok except these functions ...

void setFrequency(int d)
//Frequency = 16000000/d

TCCR1B&=0xfe; //-Stop generator
TCNT1=0; //-Clear timer
ICR1=d; // |
OCR1A=(d/2); //-+
TCCR1B|=0x01; //-Restart generator

void setupFrequencyGen()
TCCR1A=0b10000010; //-Set up frequency generator
TCCR1B=0b00011001; //-+
setFrequency(16); //-Start with 1MHz
pinMode(11,OUTPUT); //-Signal generator pin

Thanks a lot.