|
Forum Index : Microcontroller and PC projects : High speed dual PicoMite memory sharing
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11120 |
Since single PicoMite firmware is now pretty much complete I though it would be fun to look at connecting PicoMites together. Attached is some experimental firmware for the RP2350 VGA and the RP2040VGA. To run the code you need to connect two PicoMites together with 9 GPIO lines + GND. I recommend using GP0-GP7 for the data and GP22 for the clock as per the test program below. Run the host program on one PicoMite and the client on the other. Doesn't matter which order. You will see the GUI TEST pattern running on the host magically appear on the clients VGA display. Note, All this code runs in the background under PIO/DMA control without any processor involvement. To stop and rerun you must first close the background activity using MEMORY SHARE STOP Note that with two PicoMites running at 252MHz the data trasfer rate is 84 Mbytes/second Note also: that the client PicoMite is fully usable at the command prompt even though its display is being written by the host. Finally note: The HOST and CLIENT commands are blocking until the synchonisation has happened. After that everything takes place in the backgound PicoMiteVGAEXP.zip Client code ' ShareClient.bas - MEMORY SHARE CLIENT test program ' Runs on RP2040 PicoMite VGA (PIO1 available) ' ' Wiring (directly between two Picos): ' Host GP0-GP7 --> Client GP0-GP7 (8 data lines) ' Host GP22 --- Client GP22 (shared clock) ' GND --- GND ' ' Either host or client can be started first - handshake is automatic. MODE 2 Dim addr% = MM.Info(writebuff) Print "MEMORY SHARE CLIENT Test" Print "Shared buffer at address: &h" Hex$(addr%) Print "Buffer size: 38400 bytes (100 integers)" ' Start receiving: PIO 1, SM 0, data GP0, clock GP22, address, 38400 bytes ' Note: client clock pin (GP22) connects to host clock pin (GP22) via wire Memory Share Client 1, 0, GP0, GP22, addr%, 38400 End Host code: ' ShareHost.bas - MEMORY SHARE HOST test program ' Runs on RP2040 PicoMite VGA (PIO1 available) ' ' Wiring (directly between two Picos): ' Host GP0-GP7 --> Client GP0-GP7 (8 data lines) ' Host GP22 --- Client GP22 (shared clock) ' GND --- GND ' ' Either host or client can be started first - handshake is automatic. MODE 2 Dim addr% = MM.Info(writebuff) Print "MEMORY SHARE HOST Test" Print "Shared buffer at address: &h" Hex$(addr%) Print "Buffer size: 38400 bytes" ' Start sharing: PIO 1, SM 0, data GP0, clock GP22, address, 38400 bytes, clk_div 3 Memory Share Host 1, 0, GP0, GP22, addr%, 38400, 3 GUI test lcdpanel End MEMORY_SHARE_User_Manual.pdf Edited 2026-04-01 19:13 by matherp |
||||
| Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 608 |
Like the Idea ![]() Plasma |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |