| 
    
Forum Index : Microcontroller and PC projects : HDMI output from MM2/MM+: interesting?
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 ![]() ![]() ![]() Using MMBasic running on Pi-Zero as an HDMI I/F for a MM2. A loadable CFunction display driver on the MM2 (running completely standard MMBasic) communicates over a 4-bit parallel I/F to the Pi-Zero. This is also running MMBasic with a new feature OPTION REMOTE ENABLE which tells it to listen on the 4-bit port for graphics commands. Surprising, the Pi is very poor at acting as a slave device and receiving high volume data but using the 4-bit i/f I'm getting a reasonable throughput. Reliability isn't there yet as the Pi seems to crash out of MMBasic after 5 minutes or so but this could just be a wiring issue.  | 
  ||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9741  | 
    
    
 You don't rest for long before coming up with something else, do you?   This is neat. But if you had to have an HDMI output for your MM, surely there are HDMI host chips that can be had these days? Perhaps not. I know HDMI licensing is a little complicated. Smoke makes things work. When the smoke gets out, it stops!  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 Possibly, but you also need a framebuffer, a PCB layout, build and debug etc..... A Pi-Zero does all this for you for a fraction of the price  | 
  ||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9741  | 
    
    
 Yes, good point.   Smoke makes things work. When the smoke gets out, it stops!  | 
  ||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435  | 
    
    
 ![]() very good idea ![]()  | 
  ||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4109  | 
    
    
 Are you in effect bit-banging at the Pi end? Either way, roughly what sort of throughput (*) can you reliably get? Probably some follow-up questions/ideas depending on the above... (*) not sure what units make sense: 4-bit transfers per second? MB/s? John  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 Are you in effect bit-banging at the Pi end? Nibble banging   A 14 byte message takes 75 micro-seconds so 187Kbytes/second when active  | 
  ||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4109  | 
    
    
 Thanks. Would it be better to use an ordinary channel - UART, or whatever? That way Linux already has a device driver and there may be hardware buffering so overall better throughput / less CPU load. Does depend on what the MMS/MM+ has available as well as what the RPi has... John  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 UART is no good as the "proper" UART on Pi's with Wifi is used for Bluetooth. The other one has a baudrate that varies with CPU clock speed (very useful - not) SPI would be the obvious one but no-one has ever got a Pi to work in SPI slave mode. This uses some "special" I/F H/W (bsc) I2C too slow and uses the same I/F as SPI, does work sort of but not reliable.  | 
  ||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4109  | 
    
    
 Oh. Sorry, was just a thought. Er, do you change the CPU clock speed often? John  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 I don't but Rasbian does it behind your back in response to thermal /load etc.  | 
  ||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209  | 
    
    
 Use a 1455 as a Serial/SPI/Parallel input at the mm side and USB CDC or HID at the Pi side and get a pretty high throughput. You could use that also to create a 'window' on a windows/Linux machine that can act as a remote screen. (Got that working already, but it is not open source as it is made for a client so can not share). Microblocks. Build with logic.  | 
  ||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4109  | 
    
    
 I wonder if any USB uart would let the RPi do better throughput? If the MM has a uart free. John  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 I'm getting 1.5Mbits/second already so probably outside UART capability  | 
  ||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4109  | 
    
    
 I've run uarts faster. Might it reduce the CPU load and/or provide better buffering? Still, it sounds good enough already if it's reliable and predictable. John  | 
  ||||
| WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2959  | 
    
    
 Hi Peter, Am I correct in assuming that the 'source MM' can only output graphics to the 'slave Pi-MM' i.e. it can not also drive another TFT such as an ILI9341? Any chance of a video of GUI TEST LCDPANEL to see the 'smoothness' FULLY understanding this is work in progress (and excellent work too!) Thanks. WW  | 
  ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10551  | 
    
    
 Yes, of course. The code on the MM2 is a normal loadable display driver and you can only have one driver at a time Video here Note circles are worst case for the I/F as each pixel on edge of the circle takes an 18 byte message, exactly the same as a clear screen command. So timer=0:circle 200,200,100,,,rgb(red),rgb(blue):?timer gives 155mSec but timer=0:box 100,100,200,200,,rgb(red),rgb(blue):?timer is 11msec Remember, of course, this is a 800x480 display being driven by a 28-pin MM2 at 40MHz    | 
  ||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171  | 
    
    
 so the Pi is acting as a graphics terminal, albeit with custom interface?  | 
  ||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025   |