Forum Rule: Always post complete source code & details to reproduce any issue!
Page 8 of 9 FirstFirst ... 6 7 8 9 LastLast
Results 176 to 200 of 206

Thread: Raspberry Pi Pico

  1. #176
    Senior Member
    Join Date
    May 2013
    Posts
    111
    Quote Originally Posted by mlewus View Post
    Two comments. First, I also hate Arduino for all but the simplest projects. I use PlatformIO https://platformio.org with VSCode. It supports the Arduino framework but with more advanced features such as library management, multiple source files, configuration per project, hardware debugging, etc. PlatformIO also supports the mbed framework with Teensy which provides a free RTOS, many library functions similar to Arduino, and drivers for common sensors and other hardware. If you don’t like platformio you can use mbed directly as a web-based graphical IDE or as a full command line toolset.

    Second, while the Pico does not have dedicated I2S hardware, it does offer 4 programmable logic blocks called PIOs. Each PIO can be configured for fast IO operations such as I2S, driving neopixel LEDs, VGA or DVI display output, etc. The data is provided via DMA and the PIOs operate independently of the MCU and thus do not slow it down. many PIO blocks are available now unfortunately I2S is not one of them. But Pimorini has the PIM544 I2S DAC audio board available for pre-order so there will be an I2S PIO module available soon. The other available PIO modules can be viewed at https://github.com/raspberrypi/pico-examples#pio

    Thanks for this tip and I got VSCode with PlatformIO working on Linux Mint and uploaded the Blink programt using Teensy Loader (for Linux).

    However, the PlatformIO for Teensy3.0 is also Arduino based and I really want a blank C development environment where I have full control. I know it's a little crazy but I just dislike the feel of something being "beneath" my code.

    For Teensy 2 (AVR) I merely used Notepad++ plus a Make file to do development.

    I don't mind a library of some sort but I want to be in control of everything that runs on the microcontroller.
    Last edited by bigpilot; 03-19-2021 at 09:49 PM.

  2. #177
    Senior Member
    Join Date
    May 2013
    Posts
    111
    Also purchased a couple Raspberry Pi Pico's, but haven't tried them yet. Still need to solder some of the pinheaders.

    But from the documentation it looks like programming in straight C, which I prefer. Best thing would be for them to throw in a couple of easy-to-use libraries for IO and the peripherals.

  3. #178
    Junior Member
    Join Date
    Mar 2018
    Posts
    19
    "...PlatformIO also supports the mbed framework with Teensy which provides a free RTOS, many library functions similar to Arduino,..."

    Now THAT is interesting! I used MVSC for Marlin for 3D printers but I had no idea about a "free RTOS" and the "many library functions." Know where I can get more direct info? Is there a particular search phrase I could use in a search engine?
    Note: I have forgotten now to use MVSC since the stroke. I mean, I can start it up and all but I can't remember how to start a new project or anything.

  4. #179
    Senior Member
    Join Date
    May 2013
    Posts
    111
    You have to ask yourself: "Do I really NEED a Real-Time OS?"

    It adds a lot more complexity and overhead. Maybe you can fix it using interrupt based tasking?

    I've seen a lot of RTOS'es lately, some of them even run on AVR (most only on ARM).

  5. #180
    Junior Member
    Join Date
    Mar 2018
    Posts
    19
    You cant beat an RTOS for interprocess communications, They're also handy for software interrupts (when available.) And when you have multiple cores, RTOS is usually a godsend.

  6. #181
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,154
    Quote Originally Posted by skypuppy View Post
    You cant beat an RTOS for interprocess communications
    You do not need RTOS for IPC.

  7. #182
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by bigpilot View Post
    Also purchased a couple Raspberry Pi Pico's, but haven't tried them yet. Still need to solder some of the pinheaders.

    But from the documentation it looks like programming in straight C, which I prefer. Best thing would be for them to throw in a couple of easy-to-use libraries for IO and the peripherals.
    And that is what they did See the C/C++ SDK link here: https://www.raspberrypi.org/document...tting-started/
    The Pi Foundation provides a C/C++ compiler, as well as a SDK that provides C/C++ libraries to access the hardware. Also a PIO block assembler.

  8. #183
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by skypuppy View Post
    "...PlatformIO also supports the mbed framework with Teensy which provides a free RTOS, many library functions similar to Arduino,..."

    Now THAT is interesting! I used MVSC for Marlin for 3D printers but I had no idea about a "free RTOS" and the "many library functions." Know where I can get more direct info? Is there a particular search phrase I could use in a search engine?
    Note: I have forgotten now to use MVSC since the stroke. I mean, I can start it up and all but I can't remember how to start a new project or anything.
    You can get information about Teensy mbed support at https://os.mbed.com/platforms/Teensy-3-1/
    As far as I know they currently only support the Teensy 3.X. Mbed also supports a wide range of other processors and boards

  9. #184
    Junior Member
    Join Date
    Feb 2013
    Posts
    7
    Is Micropython really future and next thing after the Arduino development environment? The Pi Pico is yet another cool little SoC but I don't see a game changing software development like like Arduino or RPi Linux. Maybe something built on OpenAMP or RPMsg over USB?

    Teensy could be a serious security device with a SeL4 kernel.
    https://sel4.systems/

    --Mitch

  10. #185
    Senior Member
    Join Date
    May 2013
    Posts
    111
    Teensy would need to go with Rust if it wants to be taken seriously as far as security is concerned. But Rust has a much higher learning curve than C (I'm also dabbling into Rust).

    Maybe in combination with TockOS?

  11. #186
    Junior Member
    Join Date
    Feb 2013
    Posts
    7
    Strengthen Your seL4 Userspace Code with Rust
    https://dornerworks.com/blog/strengt...ode-with-rust/

    If there were just a container of sorts that would allow you to bring all the Teensy Arduino code into Sel4 userscpace...

    I do see the Pico C/C++ SDK have some low level primitives for building OpenAMP or RPMsg like environments on top of it.

    It helps went everything is based on a Cmake build tool.

  12. #187
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    533
    First unofficial Arduino IDE support for the Pico: YouTube and on Github.
    From the video:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	42 
Size:	383.9 KB 
ID:	24204

    @3m31s: "And as last time, the Teensy 4.1 is in a different class"

    Paul

  13. #188
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by PaulS View Post
    First unofficial Arduino IDE support for the Pico: YouTube and on Github.
    The Arduino Nano RP2040 Connect hardware was spotted in the wild in early Feb. From Tom's Hardware:
    https://www.tomshardware.com/news/fi...onnect-spotted
    I would hazard a guess that "official" Arduino.cc support for the RP2040 Connect board is not too far off, with support for other RP2040 boards to soon follow.

  14. #189
    Senior Member
    Join Date
    May 2018
    Posts
    211
    I am not promoting in any way the raspberry pico on this forum but I had a week off to experiment and started to port the MCUME project on that MCU.

    Initial release at:

    https://github.com/Jean-MarcHarvengt...ster/README.md

    We indeed are far from the Teensy 4.1 performance.
    Amiga and Atari ST emulator or any 68000 based system will not be emulated on this system.
    Even the C64 emulation is struggling without sound.
    So far Atari2600, Coleco, Odyssey, Atari800, Zx81 and Spectrum are running.

    SDK is not as great as I expected. Lot of examples but problematic when you start using all feature at same time.
    I enjoyed using their VGA library however I had some strange behavior. SD card support on that device was hopefully addressed by another guy. Many DMA IRQ conflict from the various drivers. For sound I reduced it to PWM interrupt based audio.

    I saw that Arduino SDK was now available for the pico but VGA was not yet part of it . Anyhow, I don't have more plan on the device.
    It is cheap indeed. Probably the cheapest MCU that can deliver VGA with such quality for 4 euros.
    I have seen other interesting emulators on the device but the code has to be tweaked for performances.
    So nice and cheap device but Teensy MCU are indeed another category!

    I like the drag and drop feature for flashing new executable!

  15. #190
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by Jean-Marc View Post
    I am not promoting in any way the raspberry pico on this forum but I had a week off to experiment and started to port the MCUME project on that MCU.

    Initial release at:

    https://github.com/Jean-MarcHarvengt...ster/README.md

    We indeed are far from the Teensy 4.1 performance.
    Amiga and Atari ST emulator or any 68000 based system will not be emulated on this system.
    Even the C64 emulation is struggling without sound.
    So far Atari2600, Coleco, Odyssey, Atari800, Zx81 and Spectrum are running.

    SDK is not as great as I expected. Lot of examples but problematic when you start using all feature at same time.
    I enjoyed using their VGA library however I had some strange behavior. SD card support on that device was hopefully addressed by another guy. Many DMA IRQ conflict from the various drivers. For sound I reduced it to PWM interrupt based audio.

    I saw that Arduino SDK was now available for the pico but VGA was not yet part of it . Anyhow, I don't have more plan on the device.
    It is cheap indeed. Probably the cheapest MCU that can deliver VGA with such quality for 4 euros.
    I have seen other interesting emulators on the device but the code has to be tweaked for performances.
    So nice and cheap device but Teensy MCU are indeed another category!

    I like the drag and drop feature for flashing new executable!
    Have you tried to use custom code with the other PIO to generate C64 sound? I don't know a lot about the c64 but it sounds like something that you could do without generating a lot of interrupts.

  16. #191
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,281
    Quote Originally Posted by mlewus View Post
    Have you tried to use custom code with the other PIO to generate C64 sound? I don't know a lot about the c64 but it sounds like something that you could do without generating a lot of interrupts.
    I would say the Pico would be more than busy with the sound emulation alone. The sound chip is very complex, and was the best of its time. The code for the sound emulation is quite complex, too....
    I remember, when I ported the code from an PC C64 Emu, a comment, that it needs a quite good PC Ok, this is many years ago..

  17. #192
    Senior Member
    Join Date
    May 2018
    Posts
    211
    Indeed, may be using what is left from the second core running the VGA buffer filling would be a better approach. But I have to admit that I did not look at the capability of the PIO code. It remind me the copper code on the Amiga ;-)

  18. #193
    Senior Member
    Join Date
    Aug 2013
    Location
    Gothenburg, Sweden
    Posts
    413
    After testing a bit, its quite a nice chip, the Audio library feels overengineered and does a lot of unnecessary buffer copying. The Teensy Audio code is much more efficient. The pico can run the Teensy Audio with a pio i2s output, its not a DSP engine and even with the advertised "fast" floating point floats should be avoided.

  19. #194
    Member
    Join Date
    Aug 2019
    Location
    Bucharest, Romania
    Posts
    86
    Is it possible to make the Rpi Pico work with the Teensy audio adapter? (input and output)
    I am thinking it probably is, using the PIO, but it is beyond my level of knowledge
    If yes, does anybody have any code example?

    Thanks

  20. #195
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,281
    Would be easier and save much time to just use a Teensy

  21. #196
    Member
    Join Date
    Aug 2019
    Location
    Bucharest, Romania
    Posts
    86
    Quote Originally Posted by Frank B View Post
    Would be easier and save much time to just use a Teensy
    I know, and I am using the Teensy . I was just wondering if anybody already has the code.

  22. #197
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,088
    I've not heard of anyone has writing code for Pico to work with Teensy's audio shield. I did see a few people working on generic audio stuff (not specifically for SGTL5000 or this shield) but it looked like a pretty early stage of development.

    But you might consider what "work with" really means? Pico is a Cortex-M0+ processor, the same as Teensy LC but higher clock speed. We currently only have a pretty small subset of audio features which can work on Teensy LC. The smaller instruction set and lack of DSP extensions and lack of dual buses and other subtle features on Cortex-M4 & M7 really limits how much digital audio processing you can really do (with high quality). Playing a WAV file or very simple synth is possible, but if you try to do much more, Cortex-M0+ just isn't a powerful processor for audio DSP.

  23. #198
    Member
    Join Date
    Aug 2019
    Location
    Bucharest, Romania
    Posts
    86
    Quote Originally Posted by PaulStoffregen View Post
    I've not heard of anyone has writing code for Pico to work with Teensy's audio shield. I did see a few people working on generic audio stuff (not specifically for SGTL5000 or this shield) but it looked like a pretty early stage of development.

    But you might consider what "work with" really means? Pico is a Cortex-M0+ processor, the same as Teensy LC but higher clock speed. We currently only have a pretty small subset of audio features which can work on Teensy LC. The smaller instruction set and lack of DSP extensions and lack of dual buses and other subtle features on Cortex-M4 & M7 really limits how much digital audio processing you can really do (with high quality). Playing a WAV file or very simple synth is possible, but if you try to do much more, Cortex-M0+ just isn't a powerful processor for audio DSP.
    Thank you for the info, Paul.
    I was thinking of using the Pico to build a very rudimentary walkie-talkie using the teensy audio board. Just transmitting voice from a microphone to another device and playing it to headphones. Would this be possible?

  24. #199
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,281
    My knowledge may be outdated, but as far as I remember the Pico can do either audio-in or audio-out, but not both. You would also have to see if it can provide mclk for the SGTL.

    In the meantime there is an unofficial Arduino for the Pico - so trying to use the shield might be interesting.
    The Pico hjas way more RAM than the LC, a higher clock, and the second core is sure able to compensate the missing DSP features( If its Audio is running on the other core? Don't know). As I heard it can be overclocked, too...
    Perhaps I take a look next weekend and try Arduino with the Pico. (DBG seems to work, too ??)

  25. #200
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by guzu View Post
    Thank you for the info, Paul.
    I was thinking of using the Pico to build a very rudimentary walkie-talkie using the teensy audio board. Just transmitting voice from a microphone to another device and playing it to headphones. Would this be possible?
    it's probably possible, that is, there is sufficient computing power available. But how much Library development are you willing to do, to avoid using the Teensy 4?

    Why not just use a Teensy? The libraries are powerful and mature, there's a competent & friendly support community here, and you might find that you need to do more audio processing (ie DSP filtering) on that audio that will never be possible on the Pico.

    If Pico is a hard requirement (power, for instance) there are other lower quality audio solutions available. Pimoroni released an audio board for the Pico that includes a C/C++ library. No micropython yet, and about US$20.
    https://shop.pimoroni.com/products/pico-audio-pack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •