Go to advanced search

by GregAC
Thu Jul 22, 2021 2:08 pm
Forum: SDK
Topic: Semantics of PIO "WAIT IRQ" instruction
Replies: 1
Views: 376

Re: Semantics of PIO "WAIT IRQ" instruction

You need to read it as an addition to the main semantics explained above rather than a replacement for them. The general explanation for 'polarity' states it chooses if you're waiting for a 1 or a 0. The bit you quoted specifies some special behaviour for WAIT IRQ when polarity is 1 without saying a...
by GregAC
Thu May 06, 2021 5:24 pm
Forum: General
Topic: SNES like graphics with a Pico VGA output
Replies: 3
Views: 598

Re: SNES like graphics with a Pico VGA output

Good point about running the WAD out of flash, I had ignored that option and was thinking you'd need everything in SRAM at once. Still tight but definitely makes things easier. Others have had success streaming images out of flash for displaying via VGA/DVI so there should be sufficient bandwidth fo...
by GregAC
Sat May 01, 2021 6:18 pm
Forum: General
Topic: SNES like graphics with a Pico VGA output
Replies: 3
Views: 598

SNES like graphics with a Pico VGA output

I've been playing around with VGA output from the pico and have a demo with animated sprites moving around a tilemap background. Graphically it's quite similar to what the SNES is capable of (though for full SNES like capabilities I'll need to add some more layers). Here's a picture: https://gregcha...
by GregAC
Fri Mar 05, 2021 11:02 am
Forum: General
Topic: PIO simulator?
Replies: 3
Views: 554

Re: PIO simulator?

None I'm aware of though I've found developing things using one SM as a logic analyzer (see the example here: https://github.com/raspberrypi/pico-examples/tree/master/pio/logic_analyser) is a great way to debug. You can modify the sample buffer dump code from that example produce CSV instead and loa...
by GregAC
Fri Feb 26, 2021 12:51 pm
Forum: SDK
Topic: PIO newbie questions: caveats on using PIO for JTAG?
Replies: 3
Views: 464

Re: PIO newbie questions: caveats on using PIO for JTAG?

The GPIO pins are fully muxed, you can use any GPIO pin with any state machine? Yes though it has to be a consecutive run of GPIOs. Each state machine can have its own consecutive run (in fact several as there's different mappings for the pins controlled by the OUT, IN and SET instructions and side...
by GregAC
Mon Feb 22, 2021 4:41 pm
Forum: General
Topic: Are pio pins bi-directional?
Replies: 7
Views: 710

Re: Are pio pins bi-directional?

From a quick look at the datasheet I don't think there's a way to use side set for both pin values and pin directions. It has to be all of one or the other, there's no mixing.
by GregAC
Sat Feb 20, 2021 4:24 pm
Forum: General
Topic: Are pio pins bi-directional?
Replies: 7
Views: 710

Re: Are pio pins bi-directional?

See sm_config_set_sideset in the C/C++ SDK: https://raspberrypi.github.io/pico-sdk-doxygen/group__sm__config.html#gaf543422206a8dbdc2efea85818dd650e you can use the pindirs argument to set whether the sideset effects pindirs or pins. You can also use the .side_set directive in PIO assembly with the ...
by GregAC
Mon Feb 15, 2021 1:03 pm
Forum: General
Topic: RP2040 Pico Logic Analyzer
Replies: 14
Views: 2482

Re: RP2040 Pico Logic Analyzer

All my 3 Picos can be overclocked with 420MHz always. I published a tool that automatically determines maximal safe overclocking frequency for any Pico (hardware differs): viewtopic.php?f=145&t=303278&p=1820119#p1819896 I know a Pico read with C SDK takes 1 clock cycle (not sure whether all...
by GregAC
Sun Feb 14, 2021 6:08 pm
Forum: General
Topic: RP2040 Pico Logic Analyzer
Replies: 14
Views: 2482

Re: RP2040 Pico Logic Analyzer

I've been doing a similar thing. It's actually very handy for debugging PIO programs, I've been using it to check the timing on something I'm writing to produce VGA signals. As you mention in the hackster post exploring how to turn the Pico into a device sigrok can use directly as a logic analyser f...
by GregAC
Sun Feb 14, 2021 12:31 pm
Forum: General
Topic: MIDI i/o for the Raspberry PI Pico?
Replies: 6
Views: 1890

Re: MIDI i/o for the Raspberry PI Pico?

The MIDI protocol itself is very simple (as you might expect given it was designed in the early 80s). To rig up a MIDI IN to the Pico you'd need to build some interface circuitry using optoisolators but this wouldn't be complex and could be done on a breadboard. This can give you a digital signal at...
by GregAC
Fri Feb 12, 2021 6:50 pm
Forum: General
Topic: Raspberry Pi Pico and WiFi
Replies: 11
Views: 26666

Re: Raspberry Pi Pico and WiFi

Neat, I'd guess the esp32 is using significantly more CPU time than the RP2040 requires to generate the video signal though.
by GregAC
Fri Feb 12, 2021 5:06 pm
Forum: General
Topic: Raspberry Pi Pico and WiFi
Replies: 11
Views: 26666

Re: Raspberry Pi Pico and WiFi

Why not do your thing on the esp or eps32 itself? It can be programmed in micropython too (or sketch) and wifi is integrated. I don’t see any added value to the pico without integrated wifi (or any other communication) Depends what you're doing really. The ESP32 isn't capable of everything the RP20...
by GregAC
Fri Feb 12, 2021 10:36 am
Forum: General
Topic: Oddities in PIO section of manual
Replies: 34
Views: 2139

Re: Oddities in PIO section of manual

When I'm programming these peripherals and I want to know something specific like that, I don't want to have to figure out the formula for myself. Often times I'll have a mental note of which channels I've used and think "ok I want channel 6" in the ST way, I can just plug that in. In the...
by GregAC
Fri Feb 12, 2021 12:01 am
Forum: General
Topic: ADC in free run mode question?
Replies: 8
Views: 673

Re: ADC in free run mode question?

What @fivdi says should do the trick, here's the code for adc_fifo_setup that I used to get full range samples in free running mode: adc_fifo_setup( true, // Write each completed conversion to the sample FIFO true, // Enable DMA data request (DREQ) 1, // DREQ (and IRQ) asserted when at least 1 sampl...
by GregAC
Thu Feb 11, 2021 11:02 pm
Forum: General
Topic: Playing with the pico DMA
Replies: 2
Views: 1259

Re: Playing with the pico DMA

I wonder if there is some way of getting away with just 2 channels? For the audio example at least I think you could if you used a pacing timer on the stream channel. Use the timer to make it copy a new audio sample once every 4 PWM cycles and then have the PWM channel just transfer 4 * AUDIO_SAMPL...
by GregAC
Wed Feb 10, 2021 11:00 pm
Forum: General
Topic: PI Pico is it possible to dim an LED with C
Replies: 5
Views: 559

Re: PI Pico is it possible to dim an LED with C

That should be different current. This is very true, I'm just simplifying! Especially as the common way to drive an LED via a microcontroller is in series with a a resistor. In that setup were you to have voltage (rather than plain on/off) control of the pin dropping the voltage would decrease the ...
by GregAC
Wed Feb 10, 2021 8:16 pm
Forum: General
Topic: Playing with the pico DMA
Replies: 2
Views: 1259

Playing with the pico DMA

I've written a couple of blog posts on things I've been trying out on the Pico. Nothing earth shattering results wise (I've got a nice rainbow pattern running across some RGB LEDs and a PWM audio output) but I delved into some of advanced DMA features to make it all happen rather that doing things t...
by GregAC
Wed Feb 10, 2021 7:53 pm
Forum: General
Topic: PI Pico is it possible to dim an LED with C
Replies: 5
Views: 559

Re: PI Pico is it possible to dim an LED with C

Oh and I should also mention PWM is often the best way to dim an LED anyway. You can get varying brightness with differing voltages but PWM is likely to give you finer control, especially for fading it down to particularly low levels.
by GregAC
Wed Feb 10, 2021 7:49 pm
Forum: General
Topic: PI Pico is it possible to dim an LED with C
Replies: 5
Views: 559

Re: PI Pico is it possible to dim an LED with C

The Pico doesn't have an onboard DAC (digital to analog convertor) that would allow you to output a directly controllable voltage. What you do have is PWM, pulse width modulation. This turns an output on and off rapidly, so rapidly the human eye can't perceive the flicker and instead sees it as diff...
by GregAC
Mon Feb 08, 2021 5:30 pm
Forum: General
Topic: Amp hour podcast discussing Pico
Replies: 0
Views: 161

Amp hour podcast discussing Pico

The Amp hour's latest podcast has a few engineers from RPi on talking about the Pico and RP2040 along with some other bits and pieces (such as CM4) I thought it was worth a listen: https://theamphour.com/529-embedded-hardware-with-the-raspberry-pi-team/ In particular they mention there's an internal...
by GregAC
Sat Feb 06, 2021 12:17 pm
Forum: SDK
Topic: C SDK command line No-Button-Boot
Replies: 12
Views: 1209

Re: C SDK command line No-Button-Boot

You could also use the same method with a GPIO to signal the reboot. Requires extra wiring just like using SWD but maybe useful if you don't want to populate the SWD header or otherwise have an environment where you don't want to setup OpenOCD/GDB and want to use the serial for other things. #includ...
by GregAC
Fri Feb 05, 2021 9:55 pm
Forum: General
Topic: Poor Man's Pico No-Button-Boot (NBB)
Replies: 82
Views: 6923

Re: Poor Man's Pico No-Button-Boot (NBB)

I have a buddy who will be very interested to see if it can work over ssh.
I run OpenOCD on a Pi via SSH, all works fine. After all it's just wriggling the GPIO pins so works as well as any other program that accesses GPIO does when you run it via SSH.
by GregAC
Fri Feb 05, 2021 7:35 pm
Forum: General
Topic: GPIO Current Rating
Replies: 32
Views: 6176

Re: GPIO Current Rating

May have been pushing the current limits with 5 RGB LEDs then! Given the voltage drop across the G & B channels is close to 3.3v going by their specs I don't expect much current through them but the R channels could be drawing more plus I'm using PWM so they're mostly not always on, I should mea...
by GregAC
Thu Feb 04, 2021 11:18 am
Forum: General
Topic: DMA write to pins possible?
Replies: 1
Views: 400

Re: DMA write to pins possible?

In case it is not possible with DMA, I guess it can be done through a PIO (receiving input from DMA)? That's my interpretation of what the datasheet says too, the registers to change GPIO output aren't available to the DMA engine but streaming DMA to PIO and using PIO to drive the pins should work ...
by GregAC
Wed Feb 03, 2021 9:49 pm
Forum: General
Topic: Feedback on RP2040 Silicon?
Replies: 3
Views: 402

Re: Feedback on RP2040 Silicon?

1. A M3 or M4 variant with more complete instruction set In particular, without LDREX/STREX/CLREX, it's hard to efficiently build some more complex atomic primitives that make running a SMP OS difficult. The RP2040 does have a couple of FIFOs for messaging passing between CPUs plus 32 'hardware spi...

Go to advanced search