Close

MCU Interconnect

A project log for Dreamdrive - Dreamcast Edition

Dreamcast ODE using Dual RP2040 MUCs

kaili-hillKaili Hill 04/02/2023 at 18:080 Comments

Yesterday I debugger my pio serial interconnect between my two picos. Turns out the issue I was having was due to not initing my pins for pio 🤦🏻♀️ I spent an embarrassing amount of time debugging that. Took much less time to get some kind of usable implementation to send data back and forth. 

While it’s functional, sends 4 bits of data, I think I can be smarter about the control signalling. I have a version that seems to work well and didn’t run into any dead locks. 

The two picos are connected via 6 gpio. The same on each unit. “Control lines” on gpio 22,24, and “data” on 26,27,28,29. 

TX program originally waited for RX program to pull its control line high to signal it was ready for more data and the RX program would sample the pins on the falling edge. 

In theory this made sense but I kept running into issues with deadlock. I did notice some bit drift if I started sending data before the RX was ready or was a few bits deep into the 16bit autopush setup. That shouldn’t be a problem in normal operation. 


Since MCU2 contains all the control lines, it’s important to send change states to MCU1(which contains all the address/data lines) as fast as possible so that we can switch the direction of the pins and read or write data. I’m still figuring out the lay of the land on the ide front. And the fact that MCU2 has the CD audio dat pin. I’ll likely need to figure out a better bi directional data flow to stream data from the sd card on mcu1 to mcu2 for audio playback but we can cross that bridge later. 

Next up is writing something to sample the data bus and learn more about the various control lines from the Dreamcast. 

Discussions