• Re: Pi Pico Python speed

    From Peter Heitzer@peter.heitzer@rz.uni-regensburg.de to comp.sys.raspberry-pi on Fri Feb 9 12:09:06 2024
    From Newsgroup: comp.sys.raspberry-pi

    Andy Burns <usenet@andyburns.uk> wrote:
    Peter Heitzer wrote:

    john larkin wrote:

    Cool. We just did a MicroPython loop to raise and lower a port pin 4
    times, brute force inline code, as fast as we could. One up/down cycle
    takes about 14 microseconds on a Pico, with some jitter.

    We'll repeat it in c. I'm guessing that will be 20x faster.

    I did a quick test yesterday evening using this few lines of code:
    I got 83 kHz.

    I think if you want the fastest cycle time, you'd use the RP2040's PIO
    state machine, and probably get 62MHz without overclocking, but then
    that's not really testing MicroPython ...
    Although the PIO code could be written in MicroPython with the
    decorator @rp2.asm_pio().
    --
    Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Andy Burns@usenet@andyburns.uk to comp.sys.raspberry-pi on Fri Feb 9 12:36:29 2024
    From Newsgroup: comp.sys.raspberry-pi

    Peter Heitzer wrote:

    the PIO code could be written in MicroPython with the decorator @rp2.asm_pio().

    I should get a Pico to play with ...


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Fri Feb 9 13:53:15 2024
    From Newsgroup: comp.sys.raspberry-pi

    On 09/02/2024 12:36, Andy Burns wrote:
    Peter Heitzer wrote:

    the PIO code could be written in MicroPython with the decorator
    @rp2.asm_pio().

    I should get a Pico to play with ...


    The worst part is getting a toolchain working: and understanding the
    APIs. If you don't want to use Python.

    Coding the little fuckers is pretty simple after that.
    --
    "What do you think about Gay Marriage?"
    "I don't."
    "Don't what?"
    "Think about Gay Marriage."


    --- Synchronet 3.20a-Linux NewsLink 1.114