Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
chris Regular Member Joined: 24/08/2020 Location: United KingdomPosts: 56
Posted: 12:31pm 01 Sep 2020
Copy link to clipboard
Print this post
Hello,
Still waiting on my CMM2 to arrive, and just wanted to ask some questions.
I see in the hardware specs it says :
"Supports serial over USB protocol so a desktop PC or laptop can access the BASIC console for entering and running programs."
(1) I wonder if the running of programs on the PC gives output via the terminal window or via the VGA output of the CMM2. For example, if I draw a sprite on the CMM2 via the terminal based editor, does nothing happen at the terminal?
(2) I assume that all text based commands are replicated on the VGA display too, but then how does it handle interrogating the width and height of the screen at runtime. Does the console window have to essentially be the same size as the window on the VGA connection? I want to do a lot of logic using PRINT AT, but I need to know the width and height of the screen in characters to do that. If I'm coding on the PC, then when I ask questions about width and height, is it reporting on the console or the screen resolution mode of the CMM2 as it pertains to the VGA output?
(3) I also wonder if the serial connection will double as supplying power from the PC USB connection. If CMM2 takes around 220mA then that seems like a normal USB 1.0 / 2.0 port connection is enough to power the entire unit?
(4) Another question, I read that I can update the firmware just using the simple connection to a PC? What happens if the power is interrupted, is there a failsafe area of the firmware that will let you re-apply a failed update (do I need to change a jumper on the CMM2 to apply firmware updates)?
(5) Another question, slightly off topic, but what is the safe shutdown mechanism for CMM2? With the SD card there, it might not be safe just to pull out the power right?
(6) Are there plans for a slimmed down CMM2 with less IO ports, perhaps with Pi size profile? I'd be all over that for me niece and nephew. I'd love to put one in a mechanical keyboard.
Chris Edited 2020-09-01 22:34 by chris
capsikin Guru Joined: 30/06/2020 Location: AustraliaPosts: 342
Posted: 01:49pm 01 Sep 2020
Copy link to clipboard
Print this post
I think that's right that nothing goes to the terminal from drawing a sprite. Printed text goes to both (though there's options to change this I think) PRINT @(x, y) uses pixel coordinates, so it can't work properly in terminals. I'm not sure what it does, or if there's a better option for terminals. I don't know the answer to the question either. Yes I've sometimes done that. I don't know about all the possible failures, but when it's working normally you don't need to change a jumper to apply updates - there's a command UPDATE FIRMWARE to get it ready to receive. When I had keyboard trouble I put the command in with the serial cable. And I've made sure the jumper works to enable updates, in case I need it in future.
You could take the SD card out first (while it's not being accessed) but I don't think it's necessary. Mine has an off switch, I just switch it off. (again, while it's not being accessed)
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4141
Posted: 02:34pm 01 Sep 2020
Copy link to clipboard
Print this post
If it fails, just do it again.
The STM32 CPU has the internal logic to do the programming and that internal part can't be overwritten. In effect it's failsafe.
(You can damage the cpu in other ways such as applying mains power if you're determined to damage it.)