|
Forum Index : Microcontroller and PC projects : CMM2: Two CPU's, One case
| Author | Message | ||||
| PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 634 |
For a recent project I needed two CMM2's being programmed side by side. Switching between two keyboards and mice was getting mighty tiring. So I experimented with using a four pole - double throw switch to switch the USB ports of two CMM2s. It works great for the keyboard. The mouse works, but you have to restart the program or editor for it to pick up the mouse (not a big deal). Full disclosure - this build almost cost me my sanity. I do love the case, but cramming two CMM2s and all of the wiring to switch the mouse/keyboard, plus the wiring for the video/audio out and separate power switches, all make the insides of this machine absolute chaos. I will refine it, and build it again, but the next machine will only have a single CMM2 inside it and will be much cleaner. ![]() I wired three separate power switches (shown below). The main switch controls all power (printer, display, speakers, and both processors) and then each of the CPUs has it's own power, so I can easily reboot one or other. Just above the power switches are the two toggle switches that allow me to toggle the keyboard and/or mouse between CPU 1 and CPU 2. I did original use two position switches, but got concerned that for a split second during the switch I was connecting both +5 volt lines together. So, these are now three position switches, with the center position being all terminals disconnected. ![]() Incidentally, note the black tape over the printer power LED in the picture above. This LED glows with the power of a million suns and is very distracting. Even with the black tape on - it's still easily visible. Around the back of the unit (pictured below) we have DC power input, VGA out (from CPU 2), mouse USB port, 3.5mm audio out (from CPU 2) and an optional USB-C connector for connecting to my PC. Because the USB-C goes to a powered hub, when I plug my PC into this, both CMM2s appear as separate COM ports that I can blow programs down to. ![]() The second CMM2 connects to an external monitor (shown below). This is the setup I'm using for programming them both currently, and it's working great. ![]() The printer is powered, but neither it nor the 4 coloured menu buttons on the left of the screen are connected to I/O yet. I have a 40 pin terminal block coming tomorrow that I will use for that. Here's a build picture before the mass of wires was installed. ![]() And here's the keyboard/mouse switcher (pictured below). ![]() I absolutely love this case. It works brilliant and is rock solid. I took design inspirations from the old HP-85 computer, although the name is a pun on the Rockwell AIM-65 machine. It is by no means ready for people to just dive in and print, but the files are here if anyone wants to much around with them and try and work out how it all goes together. You'll need a 420mmx420mm print bed. CompCase2.zip ![]() The weird shaped bit at the top left is the mount for my speakers. So you'll probably want to design your own. The keyboard I used was this: https://www.amazon.ca/dp/B0CP9C7QP6? This was the printer, but I haven't got it working yet: https://www.amazon.ca/dp/B0969ZLSF7 And finally, I used custom keycaps for the F1-F4 buttons. ![]() Edited 2026-06-23 13:51 by PeteCotton |
||||
| panky Guru Joined: 02/10/2012 Location: AustraliaPosts: 1128 |
An absolutely amazing project!! Just as an aside (and surely, you could jam some more inside ) could a pico be used as a keyboard/mouse switcher?Again, fantastic job, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
| BarryH Regular Member Joined: 05/01/2025 Location: AustraliaPosts: 46 |
Great project Pete. Thanks for the detail BarryH |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9977 |
Very sexy indeed. Nice work there! ![]() "Artificial Idiots" - I love that! ![]() Edited 2026-06-23 15:48 by Grogster Smoke makes things work. When the smoke gets out, it stops! |
||||
| PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 634 |
Thank you all for the kind words. I would imagine so. I did think about using one of the Teensy 4.1 chips I have kicking about. But it was one of those "can I just switch all 4 USB wires?" sort of thoughts, that just made me start experimenting. If the story ended there it would have been fine. But I'm stupid - and got obsessed with the HP-85 design. So now there's a thermal printer in it, just like the HP-85. If I had been smart, I would just have designed a two processor case, with just the keyboard/mouse switcher and two external monitors. I definitely shouldn't have included the two speakers, or the menu buttons. Sometimes, my biggest problem is that I just don't know where to stop. If I was to do it again, I would have a simple, two processor rack for my project, and a separate single processor HP-85 case with the menu buttons, printer and speakers. I will fix up the design so that it is suitable for a single processor case (but still include the option for a printer, menu buttons and speakers) - and I will probably make a couple of them to house my remaining CMM2s. |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5942 |
Hi Pete, Great project. I have to admit I miss the point of having 2 CMM's in one case..but it is a nice project. And the choice for an HP-85 (an iconic machine) is also understandable. I used one to automate a test setup using HPIB (GPIB) equipment. And I think I missed more .... You have created a UNIX GUI for CMM2 ...? ![]() Volhout P.S. any access to the SD card needed ? Edited 2026-06-23 16:52 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1121 |
Very cool!!! |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3785 |
This also caught my eye. It could use further explanation. Great project, meticulously done. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on FOTS |
||||
| PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 634 |
It's a very niche problem. After this project I don't think I will use both at the same time again. Explanation below. Not a full OS - I like the fact that the CMM2 is bare bones programming with no middle layer It's an old project which I'm revisiting. Just a FileManager for the CMM2. Link below:https://www.thebackshed.com/forum/ViewTopic.php?TID=17452 P.S. The version in this thread had a bunch of bugs which have now been ironed out. Aha - and this is the meat of the matter. My only (first world) problem with the CMM2 has been constantly needing to switch back and forth between my PC and CMM2 when I wanted to download something. I did build an ESP32 based I/O card a while ago to give the CMM2 Wifi - but it never worked very well. I then looked at hooking up the ESP01 to the COM2 port - but again it was all a bit clunky. I love TassyJim's MMEdit - and that has been a life saver for development. It inspired me that if we can send stuff from PC to CMM2 (via MMEdit), then we should also be able to pull/put stuff from/to the PC from the CMM2. So, I'm working on a Server program that runs on the PC. As you know, if you plug the USB power connector of a CMM2 into a PC it appears as a COM port which can be used to communicate with the CMM2 directly. The PC server program listens on these COM ports and interfaces with my FileManager, which allows the FileManager to browse and pull down files (from the PC) to the local SD card. Furthermore, because the CMM2s are being powered by an externally powered USB hub (not from my PC USB ports), in theory I can attach as many CMM2s as I want to the one PC. The bit I'm working on next, is sharing files CMM2 to CMM2 (via the server) - hence the need to be programming two CMM2 at once. The current thought is that each CMM2 will have a public and a private folder on the server. Files put in the public folder will be visible to other CMM2s on the same network, and can be copied (via the PC server program) locally to your own SD card. I started to get bogged down with security and passwords etc. Then had a rethink and scrapped all of that baggage. This is a throwback to a simpler time. If the computer is on the local network (of USB ports), then it's trusted. So, now I have a central Server and a star network of multiple CMM2s spreading out from it. This is very much like a mainframe with smart terminals. ![]() If we take this to the logical conclusion, the server itself could run programs like databases (or connect to cloud databases). All we would need to do would be to implement a text based protocol that can be transmitted across the COM port to the server and these functions could be used in any BASIC program. e.g. "Server:DatabaseSales:SELECT * FROM tblSales WHERE date = Today" The security credentials for a database can be stored on the server PC. So, if we wanted to query an Azure database, we can encrypt the username and password within the PC program, so it is never visible to the unsecured BASIC programs on the CMM2s, but they can send their SQL queries to the Server and it will send the data back to them as plain text. It opens a tonne of other possibilities. Maybe we can link PC networks together over the Internet and share data over different physical locations. Or run functions remotely on the server and have them return answers to the CMM2. Shared memory would also be another cool item. For example: a program reserves an array of 100 integers in the server memory. All instances of that program on this network can read/write to this shared memory (via COM port commands). Maybe allowing a multiplayer maze or adventure game or some such. The only reason I've chosen a PC is because for a larger network we would need a lot of COM ports, but in theory the server could be a single ESP32 linked to a couple of CMM2's by USB COM port, and talking to other machines via WiFi. All it really needs is enough COM ports and enough processing power to service each CMM2 terminal. I'm not sure if there's any real world application for all of this, but I did envision a classroom situation where 20 CMM2s are connected to a single PC. Students could copy programs down from the server and save their work back up to it. *Of course, I'm a CMM2 guy, but I imagine this would be easily ported to other Mites - and there's no reason you couldn't mix and match Mites on a network. Edited 2026-06-24 01:38 by PeteCotton |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5942 |
Maybe I am asking the wrong question, but aren't you designing a NAS? Would it be possible to standardize on existing protocols, so the PC side could use an existing package. Something like samba, or simpler ftp? Maybe Peter could help with a CSUB for a simple client. Not a small task since most packages use daemons, and these might not mix with MMBasic. But Barry Kauler (Puppy linux) created a samba client without daemons. Volhout Edited 2026-06-24 05:42 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |