Sujet : Re: Grounded grid VHF front-end
De : JL (at) *nospam* gct.com (john larkin)
Groupes : sci.electronics.designDate : 17. Nov 2024, 18:33:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <p49kjjpfq4t25in8slsak4moi59rj1pusp@4ax.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : ForteAgent/8.00.32.1272
On Sun, 17 Nov 2024 14:50:58 -0000 (UTC),
antispam@fricas.org (Waldek
Hebisch) wrote:
USB can do milliseconds, ethernet hundreds of microseconds, small
micros can do much better. Theoretically with a micro connected via USB
one can synchronize clocks of the micro and PC with microsecond
accuracy, I plan to try this but do not know how this will work.
We're designing some products around the RP2040, the Pi Pico
processor.
Turns out that in some cases, it's easier to bit-bang an SPI interface
than program an SPI engine. To fine-tune timings in 7 ns increments,
we can use no-op instructions.
I wonder what's a safe c-language NOP single-clock operation that no
compiler is smart enough to optimize out and doesn't add a bunch of
loads and stores.
We're experimenting with that sort of timing on an oscilloscope. The
GCC or whatever code timing tools don't work in this case.
Something like
gpio_put(FIRST_GPIO, 1);
gpio_put(FIRST_GPIO, 0);
gpio_put(FIRST_GPIO, 1);
gpio_put(FIRST_GPIO, 0);
Makes the port pin change every 7 ns. That's astounding. So maybe a
dummy port bang is my no-op. Just repeat what we just set it to.