element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum The RP2040 PIO Module is Pretty Nifty
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 16 replies
  • Subscribers 661 subscribers
  • Views 10665 views
  • Users 0 members are here
Related

The RP2040 PIO Module is Pretty Nifty

scottiebabe
scottiebabe over 4 years ago

Soft 404

  • Sign in to reply
  • Cancel
  • Fred27
    Fred27 over 4 years ago

    scottiebabe  wrote:

    Although this maybe is maybe isn't the greatest example...

    I disagree. This is exactly the sort of thing that the PIO is for, and a nice write up.

    • Cancel
    • Vote Up +6 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 4 years ago

    Thanks for posting.

    This is the first post I've seen where someone makes the PIO do something with their own code.

    Pretty much everything else seems to use it like an AVR on an Arduino.

    Which toolchain/development host are you using ?

     

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 4 years ago

    .

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • Cancel
  • javagoza
    javagoza over 4 years ago in reply to scottiebabe

    I don't know about the RP2040 or micropython, but I have a question. In those examples are you using threads for the LCD driver or is everything running from the main thread?

    If everything is being executed from the main thread, it would make it much faster to execute the LCD driver from another thread.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 4 years ago in reply to javagoza

    .

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • javagoza
    javagoza over 4 years ago in reply to scottiebabe

    I see. I ran into a similar problem recently for project14's photography project to drive a 4x7 segment display and I solved it using an SPI port and the 8-bit shift register SN74HC595NSN74HC595N. I think the raspberry pi pico has two SPI ports and something similar could be done.

     

    Window Opening Monitor with ArUco - Multi-window driver 4x7 segment display

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • neuromodulator
    neuromodulator over 4 years ago

    Great post, you convinced me to buy one

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • pablolien
    pablolien over 3 years ago

    How do you define rp2.StateMachine in micropython?  When I use out_base = (Pin(10), Pin(11....)) mpy reply with "ValueError: expecting a Pin", I suppose it not sopport more than 1 pin. 

    Thx.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 3 years ago in reply to pablolien

    .

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • pablolien
    pablolien over 3 years ago in reply to scottiebabe

    Thank you for the reply.  

    Are you try the some code with "out_shiftdir=PIO.SHIFT_LEFT" sometime? 

    I found that SHIFT_RIGHT works fine, but SHIFT_LEFT not.  Is it a problem of micropython or RP2040 limitation?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube