Shop OBEX P1 Docs P2 Docs Learn Events
A question about connecting and programming P2 directly to RPi GPIO instead of USB — Parallax Forums

A question about connecting and programming P2 directly to RPi GPIO instead of USB

Before I will start experimenting for myself, a question:

Did somenone try to connect RPi UART RxD/TxD (+ "something" to reset) directly to P62,P63 and program a P2 this way?

The goal is to connect them both without external tool and usb ports, so the Pi can program a P2 and then communicate with it using P62,P63

Comments

  • evanhevanh Posts: 15,203

    Someone must have done it. It'll be the easiest of all options. No dealing with an external clock.

    I think many that have wanted to connect with a RPi have wanted faster bandwidth though. Whether that was justified is probably another question again.

  • jmgjmg Posts: 15,148

    That should work fine.
    You can test using the simplest ping, "> P2_Ver"+CRLF string.
    If you want independent powering, you may need to add back feed solutions.

  • pik33pik33 Posts: 2,350
    edited 2023-12-16 22:07

    RPi5 changed all my way of thinking about Pi/P2 connection. RPi5 is fast enough to do a lot of stuff without going bare metal with its limited hardware, language and library support. Also, Linux based Pi is a good environment for Flexprop. Then P2 can do what it does best: realtime things and A/D conversion, while RPi can do heavy computing. So I would connect a serial port at 2 Mbps for basic communication stuff and then i2s for audio.

  • There are interesting issues with RPi and P2. I've been playing with them a lot.

    See my repos:

    This doesn't answer your programming question but does provide insight into controlling RPi CPU throttling, choosing and configuring the most usable RPi serial port for reliable comms, and, in extreme cases, moving Linux out of the way while still having Linux running on the RPi, etc.

    I hope this helps in some way.

Sign In or Register to comment.