Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:28 12 May 2025 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : PicoMite Alpha Firmware

     Page 7 of 17    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7515
Posted: 06:07pm 03 Jun 2021
Copy link to clipboard 
Print this post

From what I understand the two PIO state machines appear to be separate from the other IO on the chip. By default (in micropython) they are programmed using special instructions.

The more I think about it the less I like the idea of having default IO pins allocated for various purposes. Even when they are re-definable, it just feels "tying" somehow. And, of course, someone *will* connect 3.3v (or 0v, whichever is worse) to a pin that's been predefined as an output.
Edited 2021-06-04 04:25 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4857
Posted: 06:15pm 03 Jun 2021
Copy link to clipboard 
Print this post

Just a remark about consistency, not need to change, just a remark!

Why is it:
list functions
list commands

But
option list
flash list

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 07:49pm 03 Jun 2021
Copy link to clipboard 
Print this post

Hi folks,

God damn they're small aren't they? and the USB ports are tight too, I'm worried about damaging them mechanically never mind electronically/electrostatically.

Anyway, trauma free installing the firmware on three of them from a RPi3 and Putty seems to just work - though I have the usual problem with incomplete text being pasted from the Pi into the terminal, is this due to this "line-delay" feature that Putty apparently doesn't have ?

Also tried the Pi build of GFXterm that Rob built last May (thanks) and that seems to work and doesn't have the same problem with pasting text.

Am I correct in thinking the firmware is a fork off of that of one of the other micromites rather than off the CMM2 as some of the O/S facilities seem less mature and the editor is more primitive ? I know, it's not a micro-computer, it's a micro-controller.

Unfortunately I've got something I need to finish on the CMM2 so I will have to puit the Pico away for the moment but I'll be back in a few weeks with questions, lots of questions

Until then my thanks to Peter for his hard work providing a new toy and for the efforts of the early adopters.

Best wishes,

Tom
Edited 2021-06-04 05:50 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7515
Posted: 08:17pm 03 Jun 2021
Copy link to clipboard 
Print this post

Yep - kinda cute. :)

I don't know which MMBasic Peter's working from, but it *feels* a bit like a modified F4 version to me.

I've not tried it yet, but apparently we now have UPDATE FIRMWARE so you may not need to mess about plugging & unplugging now. In any case, you can put a button from pin 30 (RUN) to ground, press that, press BOOTSEL button, release RUN and you're in programming mode.

I currently have one of mine set up with a 4-digit LED display as a digital clock. Plus a few more bits hanging off it that I've been using for testing things. It has to come to bits shortly as I want to play with a stepper motor. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2140
Posted: 09:00pm 03 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  
I hope there can be a default configuration, such that a PCB designer would need a good reason to vary from the default


  Volhout said  I would default pins, but leave the flexibility to change. In my experience  many will use the defaults anyway.


Most designs work around the pin functions quite happily. What i have been confounded with in the past is having left GP pins spare and then finding a function doesn't map to it. Being able to shift things provides a possible lifeline if not a solution.

... but then... is the re-mappable feature over-complicating something that will be rarely used. I really don't like the idea of *having* to map functions before hand - we should avoid building in incompatibilities in what has become a fairly standard language. I recently worked with quite a bit of platform agnosticism, but to add a third would grow the self-configuring bit of the code. I always thought mm.device should return an integer which was actually a bit field. Far easier to check a bit (or pattern of)for given platform(s) than match a string... but this can be fairly easily done in our own software.

On reflection, I am favouring a fixed mapping and we just work with it... we been alright on all the other flavours of 'mite and this way it avoids having to customise the software to the platform.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2140
Posted: 09:06pm 03 Jun 2021
Copy link to clipboard 
Print this post

  thwill said   I have the usual problem with incomplete text being pasted from the Pi into the terminal, is this due to this "line-delay" feature that Putty apparently doesn't have ?


download "extra PuTTY" which has various transfer protocols built in. Then use F11 on the 'mite (XMODEM SAVE) and send the file of your choice - my dev tool chain


 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2140
Posted: 09:21pm 03 Jun 2021
Copy link to clipboard 
Print this post

I just discovered something by mistake...

I have a PiPico flashing away on my desk, it is connected via a switchable USB hub... I just turned it off by accident, realised what i had done, gave it 5 seconds and turned it back on.  No flashing, no console no nothing.

Had to re-flash it to bring it back, but then I did the same thing and it is repeatable. if the thing loses power, it needs re-flashing.

It may be my setup but it is repeatable. Can anyone else reproduce this?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7515
Posted: 09:33pm 03 Jun 2021
Copy link to clipboard 
Print this post

Let's look at the question of compatibility. What are the issues? The closest relatives are probably the MX470 and the F4 (and the F4 is probably closer to the MM+).

It's nothing at all like the CMM2 so there's no comparison there.

* The SPI display is common - good point, but rules out parallel display F4 progs and probably the advanced graphics.
* It has more IO than the MX470, so is upward compatible but the F4 has a lot more.
* Pin refs on the Pico can be GPx so nothing is back-compatible.
* Pins called Pxy on the F4 aren't compatible.
* The Pico is all 3.3v - there are no 5v pins and no OC pins so there is no guaranteed hardware compatibility.
* There is no Library so that introduces incompatibility with the MX470.
* It's probably going to be dead easy to write programs on the Pico that can't be run on any of the others, simply because it's new silicon with new capabilities.

Basically, it's a different machine. IMHO there isn't a valid reason to aim for complete compatibility because all you'll do is throttle the good stuff that it's capable of.

Peter's proposal of using PIN to allocate functions to pins is neat. If it's done at the beginning of the program it's almost self-documenting code so it's not difficult to change.

Any ideas?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7515
Posted: 09:38pm 03 Jun 2021
Copy link to clipboard 
Print this post

  CaptainBoing said  I just discovered something by mistake...

I have a PiPico flashing away on my desk, it is connected via a switchable USB hub... I just turned it off by accident, realised what i had done, gave it 5 seconds and turned it back on.  No flashing, no console no nothing.

Had to re-flash it to bring it back, but then I did the same thing and it is repeatable. if the thing loses power, it needs re-flashing.

It may be my setup but it is repeatable. Can anyone else reproduce this?

Have you tried it without having the hub in the way?. Is it ok if you unplug / plug in rather than switching it off?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6221
Posted: 10:00pm 03 Jun 2021
Copy link to clipboard 
Print this post

  CaptainBoing said  I just discovered something by mistake...

I have a PiPico flashing away on my desk, it is connected via a switchable USB hub... I just turned it off by accident, realised what i had done, gave it 5 seconds and turned it back on.  No flashing, no console no nothing.

No I can't reproduce it.
The Pico is very sensitive to excessive traffic on the USB bus during enumeration.
Even having a CMM2 plugged into the same hub can cause problems.
Turning a hub on is likely to produce such traffic.

Peter has done a lot to improve things but the main problems are in the silicon so not fixable without a new revision.
I don't know if there are any different revisions of the chip out there yet.

As suggested, try without the hub or a second hub in cascade with nothing else on the hub.

Jim
VK7JH
MMedit
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4251
Posted: 10:22pm 03 Jun 2021
Copy link to clipboard 
Print this post

  CaptainBoing said  download "extra PuTTY" which has various transfer protocols built in.


Thanks Captain, but it looks like ExtraPuTTY is a Windows only deal. Guess I will have to get to grips with the Linux command line xmodem tool ('sx', I think) or use minicom (God help me) or GFXterm.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3314
Posted: 10:36pm 03 Jun 2021
Copy link to clipboard 
Print this post

  CaptainBoing said  I just discovered something by mistake...

I have a PiPico flashing away on my desk, it is connected via a switchable USB hub... I just turned it off by accident, realised what i had done, gave it 5 seconds and turned it back on.  No flashing, no console no nothing.

Had to re-flash it to bring it back, but then I did the same thing and it is repeatable. if the thing loses power, it needs re-flashing.

It may be my setup but it is repeatable. Can anyone else reproduce this?

Volhout and I have both experienced this with a pico. Does yours also fail to flash when plugged directly into a PC USB port--that is our experience.

Yesterday I received 3 new picos ordered from PiHut--all three work as reported by everyone else--they all flash when power-cycled, while after the first one was powered off, it had to be reflashed to again present the MMBasic prompt.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3314
Posted: 10:59pm 03 Jun 2021
Copy link to clipboard 
Print this post

  Mixtel90 said   ... * The SPI display is common - good point, but rules out parallel display F4 progs and probably the advanced graphics.

Only rules out F4 programs which rely on high speed graphics, which is not likely to be many, especially in embedded applications. In fact, show us a single published F4 program which relies on the high speed of the parallel LCD bus (other than the editor, which uses the speed to achieve smoother scrolling) (except for the F4 port of "In Further Defense of the Green Hills").

  Quote  * The Pico is all 3.3v - there are no 5v pins and no OC pins so there is no guaranteed hardware compatibility.

Also no guaranteed incompatibility. Same as Raspberry Pis. Many modules and most (maybe all) sensors/switches in the 37/47 sensor kits will work, which makes it quite a powerful low-end and easy-to-use beginners microprocessor (and beginners aren't likely to want to have specify which pins are best for MISO, MOSI, SCK, CS, D/C, RST).

  Quote  * It's probably going to be dead easy to write programs on the Pico that can't be run on any of the others, simply because it's new silicon with new capabilities.

I'd be interested in seeing examples of this (other than the nifty flash chaining ability). If MMBasic is the source language, I don't exactly understand how PicoMite will be able to do things which other micromites can't. (CMM2 is of course a counter-example, but it has capabilities (primarily enabled by speed and ample memory and some built-in functions) which the other micromites don't have.) And we're still likely to be limited by the number of tokens available for commands and functions (though MATH shows how overloading can get around this if the flash space is available).

  Quote  Basically, it's a different machine.

I'd also be interested in seeing how it's a different machine. It looks a lot like a super MM+ at a great price point. More flash and more ram may enable more capability. So far, I don't see any real advantage to making the programmer define which pins have which functions except for someone designing a PCB--and as Volhout has pointed out, PCB designers have been able to work with the fixed pins on past micromites.

(I'd agree that for PWM and COUNT, for example, maybe COM1 & COM2, the additional flexibility could be useful.)

~
Edited 2021-06-04 09:32 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9493
Posted: 11:17pm 03 Jun 2021
Copy link to clipboard 
Print this post

@ Rob and all:  GFXterm connects to the PICOmite just fine, if you press ALT-1 after connecting to the serial port.





@ lizby: I have my PICOmite running through a hub.  I unplugged the hub, and plugged it back in again, and the PICOmite rebooted fine.  Perhaps different hubs are different?  I also tried plugging directly into the PC bypassing the hub, and my PICOmite reboots fine.  Strange, the issues you and Volhout are/were having with the first module.  Could the first module have suffered a static discharge/damage by any chance?
Smoke makes things work. When the smoke gets out, it stops!
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3314
Posted: 11:37pm 03 Jun 2021
Copy link to clipboard 
Print this post

  Grogster said  @ lizby: I have my PICOmite running through a hub.  I unplugged the hub, and plugged it back in again, and the PICOmite rebooted fine.


The behavior you see is what most people have seen and is what is expected. It's certainly possible that my first pico, and Volhout's, and now CaptainBoing's has been damaged, but it also seems possible that there's just something about some picos which is different.

If one of my now-working picos starts to misbehave in this way, it might be evidence that the behavior is damage-induced, but so far, so good with the new ones.
Edited 2021-06-04 09:39 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 12:52am 04 Jun 2021
Copy link to clipboard 
Print this post

@ Grogster.
          I can connect with TeraTerm OK but I tried the Alt-1 trick with GFX term and I dont get an error message anymore, it connects but I can't talk to it.
What is the exact procedure. I opened GFXterm then connected the USB then did Alt-1 then connect is that what you are doing.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9493
Posted: 01:30am 04 Jun 2021
Copy link to clipboard 
Print this post

Hi, yes pretty much what I am doing.

1) Crank up GFXterm with PICOmite connected to USB.
2) Right-click, select CONNECT.
3) Select COM port(COM9 in my case)
4) Back at terminal window now, press and HOLD the left-ALT button, then press the ONE(!) button.
5) Release both ALT and ONE buttons.
6) Press ENTER - I get the > prompt, and from there, I can issue the usual commands.



Edited 2021-06-04 11:38 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1965
Posted: 02:31am 04 Jun 2021
Copy link to clipboard 
Print this post

Thanks Grogster works OK now.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2401
Posted: 04:15am 04 Jun 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  here is a possible solution to the hardware flow control problems some have been running up against. no guarantees it will work, but worth a crack!


Pico SDK has a very old version of TinyUSB - those lines don't match and on quick inspection I can't see anything similar

Jim has changed MMEdit without it breaking anything else can you do same?


are you able to post a copy of your class/cdc/cdc_device.c file?


the problem with hardwiring DTR in GFXterm is that arduinos use this as a reset pin for bootloader access, and so GFXterm would risk resetting any arduino it is being used with.

for the moment, pressing alt-1 after opening a connection to the pico seems to be a good workaround. in future i'll look at adding a 'set DTR' checkbox in the connection window, but right now this sits below back-porting the linux/lazarus version to windows.


it is rather fortuitous that fairly early on i added the alt-1 to alt-4 keystrokes to allow changing DTR and RTS, at the time they seemed pretty useless. but i thought that someone might one day want to use them for back-channel signalling or the likes.


cheers,
rob   :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9493
Posted: 06:53am 04 Jun 2021
Copy link to clipboard 
Print this post

Rob - I'm perfectly happy just pressing ALT-1 any time I use the PICOmite, so I would suggest you don't take the time to change GFXterm at this point in time, as ALT-1 works fine, and that only takes about one extra second to do.

I like the idea of the DTR checkbox in a future version, but as you say - if you change that so DTR is asserted by default, it will cause issues with other things that DON'T want that, so I think you should just leave it as is as ALT-1 works fine.

My 2c only.  And yes - I am very happy you decided to include ALT-1 to ALT-4 when you wrote GFXterm.  I never knew of those keys before.  Hidden commands, eh?    
Smoke makes things work. When the smoke gets out, it stops!
 
     Page 7 of 17    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025