The very best would be the smallest sketch that demonstrates the problem. Sometimes in writing the example you will discover the solution and not have to ask. ![]()
void setup()
{
Serial.begin(115200);
delay(200);
int frequency, cycle_time;
frequency = 400;
cycle_time = ((1/frequency)*1000000);
Serial.print(cycle_time);
frequency = 1024;
cycle_time = ((1/frequency)*1000000);
Serial.print(cycle_time);
}
void loop() {}