sweh: (Vroomba)
[personal profile] sweh
So BBC Econet. Let's say it runs at 400Khz. (It varies from 200 to 800; let's say 400khz). There is a clock+/clock- signal and a data+/data- signal.

At 400Khz I have 2.5uS to determine if the balanced signals match, and if the data bit coming in hasn't collided with the clock. And that's not even including attempts to write data.

My AVR is clocked at 16Mhz. Here's a simple loop that toggles a pin (which just happens to connected to the LED)
void loop() {
  boolean x=false;
  int y;
  while(1)
  {
    x=!x;
    if (x) { y=HIGH; } else { y=LOW;}
    digitalWrite(LED_BUILTIN,y);
  }
}

Sticking a scope on this I get a 70Khz square wave. That is clearly not quick enough. Even with optimisation (replacing digitalWrite with inline assembler) I doubt I'll get to 100Khz. And that's not doing anything; just toggling.

I'm actually disappointed!

January 2026

S M T W T F S
    123
45678910
11121314151617
181920212223 24
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 05:49 am
Powered by Dreamwidth Studios