Author Topic: Raspberry Pi Pico  (Read 75768 times)

0 Members and 1 Guest are viewing this topic.

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Raspberry Pi Pico
« Reply #275 on: February 26, 2021, 12:22:51 pm »
Quote
The worst case scenario is when libre software is mixed with non-libre software in the same project or recommended workflow.
This.
Another example (apart from the Pico stuff, so apologies for the OT):
The DAPlink probe firmware is Apache 2.0 licensed (good!), but the recommended (and until recently the only working one) compiler was Keil (or armcc). The code size exceeds free license limitations - so the liberal licensing was, in practice, nullified by the build setup.
They are now adding real support for gcc, I appreciate the evolution.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Raspberry Pi Pico
« Reply #276 on: February 26, 2021, 03:18:31 pm »
Well, back when I had to use Cypress FX1/2 MCUs, I remember the supported compiler was also Keil, and also with a free version with very limited code size (basically unusable except for the most simple projects...) I figured out how to use SDCC - it took only a couple days AFAIR.

As I already said, using purely open source tools with the Pico doesn't look that complicated either if you're a bit experienced. (For the non-experienced ones, proprietary tools are perfectly adequate. They are usually much easier to use and set up. That may be one of the reasons RPi made that choice.)

Even the specific tools can likely be built with gcc on Windows: https://github.com/raspberrypi/pico-sdk/tree/master/tools
(from a quick look, I didn't see anything that would specifically require MS compilers. I'll give it a shot.)

Edit: I can confirm I was able to builld both elf2uf2 and pioasm with just mingw64 gcc using MSYS2. The CMake files seem to want to default to using MS tools on Windows, but I quickly wrote a Makefile instead (both tools are pretty simple with few source files), and they built without issues. I can provide the Makefiles if anyone's interested.


« Last Edit: February 26, 2021, 05:11:28 pm by SiliconWizard »
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Raspberry Pi Pico
« Reply #277 on: February 26, 2021, 08:22:02 pm »
As I already said, using purely open source tools with the Pico doesn't look that complicated either if you're a bit experienced. (For the non-experienced ones, proprietary tools are perfectly adequate. They are usually much easier to use and set up. That may be one of the reasons RPi made that choice.)
Yes, you (and I) know how to do it, did it, and see no real technical problems.
And that's exactly my point!
There's nothing that requires this kind of 'unholy' mix (exaggerating...).
Why do it this way?

The only sound reason is:
If you accept the claim that the Pi Foundation has a deep dislike of everything F/OSS, it makes perfect sense.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Raspberry Pi Pico
« Reply #278 on: February 26, 2021, 09:59:59 pm »
Why do it this way?
To avoid having to provide a MinGW/MSYS environment for make and related tools? Wanting to provide as close to a "native" experience as you can? Immediately going down some "the Pi foundation hates free software" rabbit hole is just incredibly dumb.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Raspberry Pi Pico
« Reply #279 on: February 26, 2021, 11:03:06 pm »
As I already said, using purely open source tools with the Pico doesn't look that complicated either if you're a bit experienced. (For the non-experienced ones, proprietary tools are perfectly adequate. They are usually much easier to use and set up. That may be one of the reasons RPi made that choice.)
Yes, you (and I) know how to do it, did it, and see no real technical problems.
And that's exactly my point!

My own point was: contrary to what I've read earlier (not saying it was from you), you CAN absolutely use the Pico SDK without any MS tool and with only open-source tools.
Actually, GCC (ARM target) and Make would be the only things needed. If you want to build the two SDK tools (that I mentioned above) yourself, additionally GCC (native target) would be needed. All open. If you want to be able to use CMake, which would make your life easier as this is what the SDK is based on, then just install CMake on top of it. You wouldn't even necessarily need a full MSYS environment, but using one would make installing the other tools easier (GCC, Make, CMake, etc.)

And if you don't know how to do this/or don't want to be bothered, then just use the provided tools untouched. Your choice. Isn't having a choice what matters here? IMHO, the RPi have done everything to make the SDK actually usable with open source tools only, so I can't see what more you could want. Sure that may be less obvious to do as we said, but odds are, if going all open source ever matters to you, then you'll know how to do it. And if it doesn't matter, then why care? Oh, and for the odd ones who would absolutely want to use all open source but who wouldn't know how to install and use all this, they probably would be better off using Linux, likely a straightforward to use distribution such as Ubuntu. Done.

There's nothing that requires this kind of 'unholy' mix (exaggerating...).
Why do it this way?

The only sound reason is:
If you accept the claim that the Pi Foundation has a deep dislike of everything F/OSS, it makes perfect sense.

Now this is largely an exxageration. As andersm just said, and as I mentioned earlier, one of the main reasons is probably that MS tools are much easier/straightforward to set up on Windows than MSYS and other similar environments. There may be other reasons, such as MS possibly pushing their free tools to the masses as much as they can, and maybe they donated cash to the RPi as well, so that could help... but really, it's likely just that it's much easier especially for beginners.

As to them "disliking" open source... as I also said, open source is likely a secondary concern to them compared to ease of use and low cost. But still, their Pico SDK IS open source and CAN be used with only open source tools, so I still don't know what the problem is exactly. It appears they didn't do that bad for people disliking open source.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Raspberry Pi Pico
« Reply #280 on: February 27, 2021, 10:48:17 am »
Immediately going down some "the Pi foundation hates free software" rabbit hole is just incredibly dumb.
It is sick and twisted to take a position based on observed behaviour, and tell others that position "is incredibly dumb" because you claim it is based on this one small almost irrelevant detail.  I'm glad I do not have to interact with you in real life; you must be a very difficult person to work with, twisting others positions like that.

I know the Pi foundation is hostile to libre licensing and libre software, based on observation of their behaviour over several years.  It is obvious in everything they do, even down to none of their permanent technical members submitting patches or posing questions to the core libre projects their products are based on.

Even my assertion that the Pi foundation is just the advertising arm of Broadcom is not based on suspicion or single details or conspiracy theories, just Occam's Razor: it is the simplest explanation that fits the observed facts and behaviour.

In practice, it just means one should not treat Pi products as libre, but as only vendor-supported open source.  Meaning, if you have a problem, take it up with the Pi community, not with the upstream projects.  If you do take it up with an upstream project, do not do it as a Pi user, but as an upstream project community member: that means participation, providing details and testing suggestions; trading your own efforts and time to others'.  The attitude/behavioural divide between the 'Pi communities and libre communities is real, and should be observed, to make things work without causing useless friction.

A major sore point seems to be the GNU Public License (GPL).  Broadcom is known (by their behaviour, repeatedly breaking the license) to despise it deeply.  (Their contributions to the Linux kernel are rife with problems, even though the Linux Foundation has sometimes lauded their efforts, as they often include duplicated code (poorly fitting in to the Linux kernel) and worse, binary proprietary blobs.  It looks like only their junior developers are involved in submissions to GPL-licensed products, so that senior developers do not need to sully their hands.)  Basing on BSD, MIT, and Apache (APL) -licensed projects like FreeBSD/OpenBSD would have been a much better fit for the 'Pi foundation.
« Last Edit: February 27, 2021, 11:10:27 am by Nominal Animal »
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Raspberry Pi Pico
« Reply #281 on: February 27, 2021, 01:04:42 pm »
I'm glad I do not have to interact with you in real life; you must be a very difficult person to work with
I can assure you that the feeling is entirely mutual.

Quote
Even my assertion that the Pi foundation is just the advertising arm of Broadcom is not based on suspicion or single details or conspiracy theories, just Occam's Razor: it is the simplest explanation that fits the observed facts and behaviour.
That is still entirely your own interpretation, and you're drawing some very far-reaching, far-fetched conclusions based on that.

Quote
In practice, it just means one should not treat Pi products as libre, but as only vendor-supported open source.  Meaning, if you have a problem, take it up with the Pi community, not with the upstream projects.
Man, Debian, RedHat, Ubuntu, etc. must all really hate open source too. My own observation is that the Pi foundation don't have the ideological attachment to FOSS you would like them to have, and instead take a very pragmatic approach. If there's an open source option, that's good, but if there's a better closed alternative, then that's OK too.

Offline EasyGoing1

  • Regular Contributor
  • *
  • Posts: 50
  • Country: us
Re: Raspberry Pi Pico
« Reply #282 on: February 27, 2021, 01:31:58 pm »
Ah well, what I usually experience with other boards is that I need to bodge something up to multiply the very limited GND options.
It can also help with signal integrity.

As for the replication, it's just more freedom to use the pins one finds more convenient, so definitely a plus wrt to a stricter pin/function mapping.
ON the ground issue, I have always just tied the ground pin from whatever microcontroller I'm working with to the ground rail on my breadboard. I apparently never gave it a second thought and didn't consider having only two ground pins to be an inconvenience because when I first looked at the pinout diagram for the Pico, the very first thing I said to myself was, "What the hell is up with all these ground pins? Why would they even do that?" Then to read your comment on it just hours after having that conversation with myself was amusing.  :)

On the I2C channels, I tend to see all those "options" as points of consideration because to me, a microcontroller simply doesn't do "options" ... they offer a function on a single pin and we are to be thankful that its there in the first place ... lol ... so all of this "flexibility" just feels more like coddling to me ... but that would be MY problem and no one else's.  lol However ... we are talking about a couple of INCHES of real estate here ... do you REALLY need I2C channel 0 two tenth of an inch closer to that sensor that you're connecting? I dunno ... obviously it doesn't hurt to have a bunch of them all throughout the pis other than it clutters up the pinout diagrams :-)

I've not yet used python on the Pico (only for the Pico), after all the C toolchain is perfectly fine, though I wonder why they had to go with MS compilers/nmake for their utilities rather than freer alternatives (e.g. ninja/make/gcc).
MC command line compilers + nmake are freely available, but the licensing is not really Ok, unless you are either an hobbyist or own a licensed copy of VS.

I still have three un-opened Pico's (shipping from the UK was $15 whether I bought one or four so I bought four to justify the shipping cost LOL) ... the next one I bust out I will definitely look at the C++ dev route... though I am curious as to the ease or difficulty of intentionally utilizing each core in the processor with C++. With Python it was a simple matter of calling in a library and defining a separate thread ... at least that's what the famous companion Python book said. I could not attest to whether or not it starts thread sharing in one of the cores or if it actually does start the thread in the other core ... I haven't dug in that far yet to find out.

Mike
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Raspberry Pi Pico
« Reply #283 on: February 27, 2021, 04:25:51 pm »
I'm glad I do not have to interact with you in real life; you must be a very difficult person to work with
I can assure you that the feeling is entirely mutual.
I'm on good terms with everybody I've ever worked with, except for a few people who remind me of you.  They, too, had issues with the quality of their own work, and needed to cast shadow on others to shield themselves.

That is still entirely your own interpretation, and you're drawing some very far-reaching, far-fetched conclusions based on that.
I see.  You are one of those people who always claim that situations which others predicted and you did not want to admit were likely or even possible, "were impossible to predict".  Like what happened with Nokia and Stephen Elop, for example.  Or how the "Apotti" system would grow to hundreds of millions and yet be a pile of unusable shit.  Good luck with that attitude; reality does not coddle naïve idealists.

Man, Debian, RedHat, Ubuntu, etc. must all really hate open source too.
Huh?  Package maintainers regularly interact with their upstream projects.  Debian and Ubuntu even have policies in place that core project patches must be submitted upstream before they're accepted.  What the heck are you mumbling about?

My own observation is that the Pi foundation don't have the ideological attachment to FOSS you would like them to have, and instead take a very pragmatic approach.
No.  A pragmatic approach is to ensure the projects whose work product you rely on, also cater to your own needs.  You work with them.  Your leading engineers should be familiar with those core projects, and be willing to allocate resources (at least one developer) to fix the issues found.  You do not hire junior developers for a half-year to a year and have them do that interaction, then fire them, just so that your senior developers do not need to interact with those projects.  (Look at the Raspberry Pi Foundation technical personnel, for example, and try to find their contributions to any libre projects.)

If you care about your products longevity – and note that while commerical concerns are usually against that, according to the Pi Foundations' own goal statements, they should, because that way learning materials stay relevant in the medium to long term, and not just in the very short term  – you also should try to push whatever changes and additions to the core project your product needs, to those upstream core projects.  Like Linux distributions do, for example.  (Except for Oracle, which is another company that just does not understand libre software projects.)

Otherwise you just replicate the current situation with e.g. network routers: the manufacturers fork the projects and have junior devs cobble together something based on Googled guides, with updates provided only until the next model is released.  When the vendor loses interest, the users are left with little to no options, except buy the newer model, or switch to a DIY approach (say via OpenWRT, which can be a steep learning curve).  The problem arises when those users start venting their frustration and "how Linux will never be a true OS" at the libre project developers, because they do not understand that their predicament is due to their vendor, with those projects being completely innocent of the situation frustrating the user.

Regardless of how hard you wish to paint me as a Linux/FOSS zealot, I ain't one; but I am a realist, basing my opinions on behaviour I can observe, not on pretty speeches and wishes and hopes.
« Last Edit: February 27, 2021, 04:28:01 pm by Nominal Animal »
 
The following users thanked this post: newbrain, Jacon, bd139

Offline exe

  • Supporter
  • ****
  • Posts: 2562
  • Country: nl
  • self-educated hobbyist
Re: Raspberry Pi Pico
« Reply #284 on: February 27, 2021, 08:19:02 pm »
I've been working on my first project with rp2040 and so far I'm very pleased with pin flexibility thanks to PIO. No more routing trouble I had with stm32. I just pick any pins that close, say, to ADC and make them bidirectional SPI. How cool is that? :).

I once had a situation on stm32 that a pin couldn't trigger on falling edge, and that was the only free pin left. Don't get me wrong, I think stm32 are cool devices, but rp2040 gives me more satisfaction for digital IO.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Raspberry Pi Pico
« Reply #285 on: February 27, 2021, 09:37:07 pm »
It's a pity they only have FS USB :(
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Raspberry Pi Pico
« Reply #286 on: February 28, 2021, 05:50:24 pm »
In another thread, I outlined how one could use one form of pulse density modulation instead of pulse width modulation for e.g. LED intensity control.  Basically, for each output pin, you have a state counter S, and the duty cycle or current modulation value V, both N-bit unsigned integers, and you loop over
    S = S + V      (or in mathematical terms, S = (S + V) modulo 2N)
    pin = (S < V)
where the output pin state is equivalent to the carry/overflow flag of the addition.

In simple terms, if you consider a PWM signal of the same duty cycle V, instead of having all high states at the beginning of the 2N-sample period, and all low states at the end of the period, this distributes them over the entire period with as even intervals as possible.  This means that for example with N=8, using 6% to 94% intensities (V=16..224), the maximum consecutive low or high duration of the output is 16 cycles, instead of the 128 (minimum) to 240 (maximum) with PWM.  The frequency of state changes is much higher with pulse density modulation, and should produce much less flicker and capacitor/coil whine at 1 kHz - 5 MHz clock rates (4 Hz to 20 kHz periods at 256 clock cycles per period).  The period frequency of PDM is also much less apparent than PWM, because of how the "pulses" are spread across the entire period.

I was hoping the Pi Pico PIO could do this.  According to the RP2040 datasheet, it has two PIO units with four state machines each, with each state machine having two scratch registers – so each of the eight state machines available might be able to do this.  Alas, the 9 instructions the PIO state machines support – JMP, WAIT, IN, OUT, PUSH, PULL, MOV, IRQ, and SET – does not include an operation to add one scratch register to another.  (Either scratch register can be incremented or decremented by one, but that isn't sufficient for this.)



Another possible purpose for the PIO would be to interface to various display modules using ILI9341 or similar controllers, with parallel data transfers for higher display refresh rates.  (I happen to really like BuyDisplay/EastRising 2.8" 240x320 displays with an IPS panel.)  Typically, 16 or 18 data I/O lines are needed, five control outputs (chip select, read strobe, write strobe, data/command select, and reset), and one input (tear effect).

The reason the parallel interface is not that common with microcontroller projects (but is with FPGAs!) is those extra control outputs.  There is no clock per se; the display controller latches the data at rising edge of the write strobe.  Commands have the data/command low, and following data words high.  This is not easily handled with DMA (although you can chain DMAs, or use non-DMA for the command word and DMA only for the data; but even then the write strobe handling is a bit complicated).

There are lots of SPI libraries for these display controllers, though; including for Pi Pico.

On the ILI9341 (datasheet), all commands are 8 bits only, and all data values are 8 bit only except for memory reads and writes (0x2C Memory write, 0x3C Memory write continue, 0x2E Memory read, and 0x3E Memory read continue) which use the full 16 or 18 data lines (RGB565 or RGB666 data).  The longest command is 0x2D Color set, which takes 128 data bytes; used in the 16-bit data mode to expand the 5 red bits to 6 bits, 6 green bits to 6 bits (!), and 5 blue bits to 6 bits.  Memory reads and writes use a predefined rectangular area, continue commands continuing where the previous ended, and normal memory reads/writes starting at the beginning of the predefined area.

It seems to me that a state machine that consumes 8-bit data, first byte always being the data length, followed by the command byte, followed by the specified number of data bytes, could implement register/command writes with just a few instructions.  (The problem with RP2040 is that it has so little room for PIO programs, just 32 instructions.)  Memory write could be a separate state machine.

I have considered using a number of different ARM microcontrollers for this – basically as a programmable display unit –, but either their GPIO bus is only 16 bits wide (so 18-bit not being possible at all), DMA triggers (noting the need to strobe the write pin per data word), or something else has made me discard the idea; most recently I've been thinking of using a tiny FPGA, say iCE40HX1K, for this.  Olimex has a nice-looking, affordable OSHW board for testing the idea, too; the BGA and 0.5mm pitch TQFP/VQFP footprint may be outside my current soldering ability to do a board from scratch.

RP2040 sounds like a viable way to implement this – for example an USB 1.1 (12 Mbit/s, about 1 Mbytes/sec in practice) 320×240 external display module for appliances (routers and NASes), perhaps with JPEG or PNG decompression, and/or YCbCr->RGB conversion, perhaps YCbCr DCT to RGB.  Especially if one were to extend the framebuffer (and pixel data RAM) with QSPI PSRAM.  Anyone done that yet?



The reason I mentioned Nokia and Stephen Elop earlier, is because when I and others expressed incredulity on his choice because his career (Macromedia, Adobe, Juniper, Microsoft) shows he has a strictly proprietary software mindset, actively hostile to libre software, and thus would be unable to carry Nokia's Linux-based efforts.  He has never fostered cooperation between companies, rather having the Embrace-Extend-Extinguish mentality Steven Ballmer drove at Microsoft (perhaps the reason why Ballmer approached Elop at Juniper in the first place?), and would likely drive Nokia into the hands of a large software house, like Microsoft.

People like andersm laughed at those like me, claiming we were spouting "conspiracy theories of Bill Gates paying Elop to destroy Nokia from the inside so that it could be bought cheaply by Microsoft".

That is exactly the kind of twisting of opinion to be able to ridicule it, that I rail against.  Instead of acknowledging the reasons for my opinion and arguing them, those reasons are replaced with a ridiculous assertion.  Instead of having the uncomfortable discussion about what extending Elop's policies and approaches to Nokia would likely lead to, we were painted as Linux zealots spreading conspiracy theories.  It still offends me, especially because we were right: Elop may have been the best choice available, but the result of his leadership at Nokia lead to perfectly predictable results.  That does not mean Elop is a horrible person or participated in any conspiracy, just that choosing him as Nokia's CEO lead to entirely predictable results – results that people like andersm still claim "nobody could predict".

This is pertinent in this thread, because of Eben Upton: he is the person responsible for steering the Raspberry Pi community and technical personnel, and while technically adept and probably a very nice person, seems to have an irrational dislike of libre licensing, and that has permeated the way the Foundation works.  Like I said, just look at the Foundation personnel, and try to find their contributions in any major libre projects their products are dependent on!

I do not really care if the Pi products are libre or not; there are valid reasons for and against.  I do care about doing things wrong, with poor results or causing undue friction.  It is hard enough to deal with individuals who consider themselves Paying Customers and have the contract and privileges that entails in libre projects and especially discussions about using libre projects (they just do not understand the cost-benefit calculations at all!); having a Foundation with a good purpose have an internal culture that snubs the libre communities that their own products relies on, is .. stupid.  The only ones that could maybe talk to the Foundation are their own customers; people like me, outsiders, talking to the Foundation, would just aggravate them.  That is why I am talking about this to you.

(Hopefully, the above two examples of projects with the Pico I listed earlier in this post, shows that I am not irrationally hostile to anyone or anything.)
 
The following users thanked this post: thm_w, newbrain, techman-001

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Raspberry Pi Pico
« Reply #287 on: February 28, 2021, 06:44:03 pm »
.... shows that I am not irrationally hostile to anyone or anything.)

Not that I think you need to be defended, because I don't, but my experiences with you, to the extent that I remember, have not led me to believe that you are "irrationally hostile".

But, I am only responding because I want to ask you something that is completely off topic of the thread. I know that there are more than 5.5 million people in Finland and I don't expect that you know them all, but from your POV (maybe it was covered more), I am wondering if this (see below) was legit or have I been duped?

- Invest in science - it pays big dividends. -
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Raspberry Pi Pico
« Reply #288 on: February 28, 2021, 07:13:01 pm »
I am only responding because I want to ask you something that is completely off topic of the thread. I know that there are more than 5.5 million people in Finland and I don't expect that you know them all, but from your POV (maybe it was covered more), I am wondering if this (see below) was legit or have I been duped?
You're not the first one to ask!  Yes, it is quite legit.

Indeed, traditional Finnish lake and river boats have a prow/bows specifically to allow them to be easily dragged on ice and over capes.  (One of the oldest known fishing nets, a ten thousand year old Antrea net, was found in Karelia, then Finland, in 1919; now near Kamennogorsk, Russia.)  Finns have used rivers and lakes as "motorways", and being able to do so when there is still ice, and to move boats between rivers over small hills and capes, was important.  (Look at e.g. Comb Ceramic culture, four to six thousand years ago: they used lakes and rivers to transport goods, so that ordinary tools contained red slate from Scandic mountains, and flint from Valdai mountains, 2000 km to the South-East.)

The video is on the Baltic Sea, and the row boat is obviously of newer design, but probably either aluminium or sturdy enough fibreglass to do that safely.

The danger, really, is if the wind changes and crushes your boat between ice floes.  Despite their mass and volume (typically 90% underwater), they move surprisingly easily, including driven by even moderate winds.  On an open sea like that, it's pretty safe.  I bet a major reason they had the drone was to keep track of how the floes move, to avoid trouble.

Edited to add: Without the drone in the air to give a wider view, it would be too dangerous to do.  The rower is obviously skilled and in good health, so I'd compare the effort shown in the video to maybe a 20km jog, a half-marathon (but this is just my personal estimate, I haven't actually pushed ice floes on a row boat myself; although I did like rowing as a teenager).  Rowing is very much a skill; especially the way you handle – and the shape of – the blade of the oar.
« Last Edit: February 28, 2021, 07:38:33 pm by Nominal Animal »
 
The following users thanked this post: thm_w, newbrain, DrG, YurkshireLad

Offline tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7391
  • Country: nl
  • Current job: ATEX product design
Re: Raspberry Pi Pico
« Reply #289 on: February 28, 2021, 09:52:31 pm »
I've been working on my first project with rp2040 and so far I'm very pleased with pin flexibility thanks to PIO. No more routing trouble I had with stm32. I just pick any pins that close, say, to ADC and make them bidirectional SPI. How cool is that? :).

I once had a situation on stm32 that a pin couldn't trigger on falling edge, and that was the only free pin left. Don't get me wrong, I think stm32 are cool devices, but rp2040 gives me more satisfaction for digital IO.
You should take a look at silicon labs gecko microcontrollers. It's the dream. Amost any function can be routed to any pin, down to the point that I dont even look at the datasheet  anymore. SPI, I2C, UART, I just route it to the closest pin possible and done.

It's a pity they only have FS USB :(
What are they supposed to do with 480MBit/s data? It is way too much for small micros, and it requires different set of transistors, and process nodes, that guarantee high power consumption.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Raspberry Pi Pico
« Reply #290 on: March 01, 2021, 03:18:40 pm »
What are they supposed to do with 480MBit/s data? It is way too much for small micros, and it requires different set of transistors, and process nodes, that guarantee high power consumption.

PIO can run at 60 MHz. If it's 8-bit wide, you get 480 Mbps. If it's 16-bit wide, it's 960 Mbps. This is about the same order of magnitude as USB HS. USB FS is only 12 MHz, roughly 10 Mbps. This is clearly too low compared to data rates PIO can achieve.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Raspberry Pi Pico
« Reply #291 on: March 03, 2021, 06:34:08 am »
Sigh.   After playing and poking around a bit, using the CMAKE-based build environment that the Pico SDK implements...  I think I want to take back some of the nasty thoughts I've had about the Arduino build process... :-(
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4039
  • Country: nz
Re: Raspberry Pi Pico
« Reply #292 on: March 03, 2021, 09:41:10 am »
Arduino is really such an easy on-ramp.

Even if it puts you in the slow lane, you're still on the motorway.
 

Offline tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7391
  • Country: nl
  • Current job: ATEX product design
Re: Raspberry Pi Pico
« Reply #293 on: March 03, 2021, 10:35:52 am »
RPi Pico: 4 EUR
SparkFun MicroMod RP2040 Processor: 12 USD
SparkFun Pro Micro - RP2040: 10 USD
SparkFun Thing Plus - RP2040: 16 USD
Adafruit whatever: Coming soon.
I see where this is heading...

What are they supposed to do with 480MBit/s data? It is way too much for small micros, and it requires different set of transistors, and process nodes, that guarantee high power consumption.

PIO can run at 60 MHz. If it's 8-bit wide, you get 480 Mbps. If it's 16-bit wide, it's 960 Mbps. This is about the same order of magnitude as USB HS. USB FS is only 12 MHz, roughly 10 Mbps. This is clearly too low compared to data rates PIO can achieve.
So, you want to feed an external chipset with so much data? Maybe, you should give it a try, there are plenty of ULPI interface chips out there.
Actually, coming to think of it... It would be interesting to see, wheteror not the USB is implemented in hardware or they just use specific PIO blocks to do a software implementation.
Or if one could implement a second USB on a PIO.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Raspberry Pi Pico
« Reply #294 on: March 03, 2021, 04:21:04 pm »
So, you want to feed an external chipset with so much data?

If it had a built-in HS USB and cost $2, I would definitely consider it.

But I guess $4 for the board is some sort of promotional price, and bare chips won't be as cheap ...
 

Offline Rudolph Riedel

  • Regular Contributor
  • *
  • Posts: 67
  • Country: de
Re: Raspberry Pi Pico
« Reply #295 on: March 07, 2021, 06:27:48 pm »
I looked for it but this appears to be missing from this thread:
https://github.com/Wiz-IO/wizio-pico

This worked right away under Win10.
Going the documented way still does not work for me.

 

Offline exe

  • Supporter
  • ****
  • Posts: 2562
  • Country: nl
  • self-educated hobbyist
Re: Raspberry Pi Pico
« Reply #296 on: March 13, 2021, 08:52:04 pm »
Found this excellent video on PIO: https://youtu.be/yYnQYF_Xa8g .

BTW, how to connect rp2040 to usb, but not to use usb for power? Should I just leave +5V pin unconnected, leaving only GND, D+ and D- connected?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Raspberry Pi Pico
« Reply #297 on: March 13, 2021, 10:14:28 pm »
See section 4.5 of the Pico datasheet. All explained better than I could when typing on a phone.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline tunk

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: no
Re: Raspberry Pi Pico
« Reply #298 on: March 15, 2021, 05:29:42 pm »
Cliff Matthews reports in another thread that there's someone
at instructables who's using DMA and PIO to make an AWG:
https://www.instructables.com/Arbitrary-Wave-Generator-With-the-Raspberry-Pi-Pic/
 
The following users thanked this post: MK14

Offline tszabooTopic starter

  • Super Contributor
  • ***
  • Posts: 7391
  • Country: nl
  • Current job: ATEX product design
Re: Raspberry Pi Pico
« Reply #299 on: March 15, 2021, 06:00:00 pm »
I've been wondering about the PIO for a while.
Can it be used for old-school parallel bus? Like 16 bit address 8 bit data? Or the 16 bit address + data multiplexed?

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf