Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMite V6.02.02 betas

   Page 2 of 4    
Posted: 03:18pm
06 Apr 2026
Copy link to clipboard
mozzie
Senior Member

G'day Mick,
Considering there is a fair bit of processing required to get from USB to serial, most of the converters appear to have some form of state machine or CPU involved, the MicroBridge is a PIC16F1455 so certainly has some smarts.

From datasheets:
CP2102 has 576 byte RX / 640 byte TX buffer
FT232R has 256 byte RX / 128 byte TX buffer

So we do have a small amount of buffering, so long as we don't send "war and piece" in one go we should be sweet.

I do realize I am asking for the "Cake with the Icing and a cherry on top" or "looking a gift horse in the mouth" so to speak, however I do believe that the ability to plug the MicroBridge into the USB-CDC would be a very useful thing.

YMMV.

Regards,
Lyle.
 
Posted: 03:34pm
06 Apr 2026
Copy link to clipboard
Mixtel90
Guru


At a minimum of 1.5 Mbps it doesn't take long to fill a 576 byte RX buffer on a CP2102. And there's no handshake to stop it.

You'd be better using a Pico-Zero to do USB-serial conversion. It's not much more expensive and not that much bigger physically - and you get a bigger buffer, its own console connection and a serial port to play with. :) Load it with the new non-USB firmware and directly connect the USB port.
 
Posted: 03:48pm
06 Apr 2026
Copy link to clipboard
mozzie
Senior Member

G'day Mick,
I think we may be looking at different use cases here.

You are of course correct that the buffer would be overrun under those conditions, however we do have control of what we send and the rate its sent from MMBasic. If we are sending a few bytes of data back and forth then all is well.

The idea of using RP2040-Zero as a serial to USB converter is a good one, I have a few flashing at me now testing the CDC connection  

I am more specifically asking for the MicroBridge to be implemented due to its widespread inclusion in MicroMite backpacks etc. these already exist and it would, in my opinion, be great to allow them to share data via the USB-CDC with a PicoMite host.

Regards,
Lyle.
Edited 2026-04-07 02:00 by mozzie
 
Posted: 04:06pm
06 Apr 2026
Copy link to clipboard
Bleep
Guru

Here is a Mandelbrot explorer, using Peters Easter Egg.
I did write a C program for the Pi, a very long time ago, for a Mandelbrot plotter which was quite a bit faster than the standard method, I seem to have lost it. :-( Basically it recursively drew boxes, initially around the whole screen, then, if there was colour variation in the box perimiter, it divided the area inside the box into 4 and drew boxes around each of them, if there was colour variation in any of the box perimiters, it did the same again, recurively until it either got to the center of a box, in which case that box was done, or there was no colour variation in the perimiter, in which case you could colour the whole of that box the same as the perimiter. So very good if there was a lot of black, or single colour regions, not quite so good where there was a lot of colour variation. It looked good as it drew as well because the whole screen built up. :-)
The keys for exploring are in the header, It works on a LCD, just set LCD=1.
' Mandel.bas
' Demonstrates all features of the MANDELBROT command
'
' Requires a configured display (SPI LCD, VGA, etc.)
' Set LCD=1 for a LCD display, 0 for VGA/HDMI
' Press Ctrl-C at any time to abort a draw in progress
' Space bar to exit and reset when drawing complete
' w=move up screen, s=move down screen
' a=move Left, d=move Right
' +=Zoom in, -=Zoom out
' i=Increase iterations(gets slower), more resolution.
' o=Decrease iterations(gets faster), less resolution, may end up black!

Dim Integer LCD=0,r=64
Dim String s Length 50
' Start with a clean slate
If Not LCD Then MODE 2
Mandelbrot Reset
Mandelbrot Draw

Do
Do :s=Input$(50,0):Pause 50:Loop Until s<>""'wait for a key
s=Right$(s,1) 'Get single last char
Timer =0
Select Case s
Case "a","A"
 Mandelbrot Pan 50, 0
Case "d","D"
 Mandelbrot Pan -50, 0
Case "w","W"
 Mandelbrot Pan 0, 50
Case "s","S"
 Mandelbrot Pan 0, -50
Case "+","="
 Mandelbrot Zoom 2
Case "-","_"
 Mandelbrot Zoom 0.5
Case "r","R"
 Mandelbrot Reset
 Mandelbrot Draw
 r=64
Case "i","I"
 r=r*2:If r>8192 Then r=8192
 If r>1024 Then Text 20,120,"May take a minute or Two"
 Mandelbrot Draw r
Case "o","O"
 r=r\2:If r<32 Then r=32
 If r>1024 Then Text 20,120,"May take a minute or Two"
Mandelbrot Draw r
End Select
Text 0,0,""
Print "Done in " Str$(Timer/1000,3,2) " Sec"
Loop Until s=" "
Mandelbrot Reset
'Not used Mandelbrot Centre x,y
CLS
End

Regards Kevin.

Footnote added 2026-04-07 04:47 by Bleep
Found the recursive version, it also includes extra speed opimisations, checks for going out of bounds and repeating sequences.
mandc.zip
 
Posted: 04:52pm
06 Apr 2026
Copy link to clipboard
bfwolf
Senior Member

@Peter: It appears that the host needs to provide a "packet" called "SET_LINE_CODING" to the device so that baud rate, bit count, parity, etc., can be set in a USB-to-UART bridge such as the FT232 or PL2303. Therefore, the parameters from "OPEN COMn..." would need to be passed on somehow.

https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-get-the-USB-host-CDC-example-working-with-FTDI-adapter/m-p/809042

Regards.
 
Posted: 06:09pm
06 Apr 2026
Copy link to clipboard
Mixtel90
Guru


Personally I can't raise any enthusiasm for the Microbridge idea when the Zero is virtually ready to go off the shelf, needing no special programming tools. The PIC alone also costs more than a Zero here, by the time postage costs are taken into consideration.

And they don't exist - I haven't got one now, I don't think. ;)

In fact, I would tend to use a Zero rather than a Micromite for most things now. Mainly because so much is already integrated into it (including the Microbridge). For my own purposes I would build a Pico or Zero backpack and move the display over. The Micromite only really scores on the number of ADC inputs (but at lower resolution).
 
Posted: 09:46pm
06 Apr 2026
Copy link to clipboard
JanVolk
Guru

V6.02.02b0

PicoMiteRP2040 no longer supports the CAMERA command.

Version:
PicoMite MMBasic RP2040 V6.02.02B0
Copyright 2011-2026 Geoff Graham
Copyright 2016-2026 Peter Mather

EDIT camera still works.
Camera is still present in list commands.

Jan
 
Posted: 12:05am
07 Apr 2026
Copy link to clipboard
PhenixRising
Guru

  Mixtel90 said  The baud rate from the PicoMite USB port is that of the USB (probably 1.5 Mbps, but 12 Mbps is also a standard for USB 1.1 if you reduce the cable from 9m to 3m).



According to Gemini:

  Quote  
To be crystal clear: 500,000 Bytes per second (roughly 0.5 MB/s) is a very solid, achievable target for the RP2350 using TinyUSB.


Not too shabby  
 
Posted: 03:28am
07 Apr 2026
Copy link to clipboard
toml_12953
Guru

What am I missing? On the PicoCalc, the following program doesn't split up the line as I thought it should:

OPTION escape
INPUT "Enter\n\ryour age";a


Output:
Enter\n\ryour age?


Don't escape sequences work in INPUT statements?

Here's my OPTION LIST:
PicoMite MMBasic RP2350B V6.02.02B0
OPTION SERIAL CONSOLE COM1,GP0,GP1,BOTH
OPTION LCD SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP6,GP7, SLOW
OPTION BAUDRATE 19200
OPTION FLASH SIZE 16777216
OPTION LIBRARY_FLASH_SIZE  51000
OPTION COLOURCODE ON
OPTION CONTINUATION LINES ON
OPTION CASE UPPER
OPTION TAB 8
OPTION DEFAULT COLOURS  BLACK
OPTION KEYBOARD PICOCALC
OPTION PICO OFF
OPTION CPUSPEED (KHz) 384000
OPTION LCDPANEL CONSOLE ,, FFBF00
OPTION DISPLAY 26, 40
OPTION LCDPANEL ST7365P, PORTRAIT,GP14,GP15,GP13
OPTION BACKLIGHT LCD 128
OPTION SDCARD GP17, GP18, GP19, GP16
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION MODBUFF ENABLE  192
OPTION PLATFORM PicoCalc
OPTION PSRAM PIN GP47

Edited 2026-04-07 13:31 by toml_12953
 
Posted: 06:16am
07 Apr 2026
Copy link to clipboard
matherp
Guru

To avoid changing tokens the PicoMite still has the camera command but it is a nop. It will disappear completely when 6.02.02 is released
 
Posted: 07:36am
07 Apr 2026
Copy link to clipboard
phil99
Guru


Deleted.
Edited 2026-04-07 17:38 by phil99
 
Posted: 08:06am
07 Apr 2026
Copy link to clipboard
mozzie
Senior Member

G'day Mick,

  Mixtel90 said  And they don't exist - I haven't got one now, I don't think. ;)

The reason for that might be geographic, the MicroBridge is on Geoff's site and was published in "Silicon Chip" mag here in Aus (possibly EPE in UK) and is sold as a kit on their site. It was used in the MM backpacks / Explore 28 / Explore 40 and a few other projects. Word is they have sold very well.

I believe Geoff and Peter (amongst others) designed it with comunications with the MMite in mind, for this it is hard to beat.

Whilst I agree that if designing from scratch the RP2040-Zero as a USB-Serial is hard to beat, for existing designs based around the MMite Backpack this is not going to be the case.

Yes the MMite lacks a lot of the modern additions of the PicoMite, however for simpler applications it is rock solid reliable and in a class of its own when it comes to low power battery / solar applications.

My thinking is dataloggers etc using a battery powered MMite with an EEprom / Flash chip. Normally a laptop is used to retrieve the data via USB but being able to use a PicoMite to suck out the data to SDCard saves carting a laptop around at all. I'm sure there are 1000 other uses as well.

Once again, the range of uses for these marvelous devices is forever expanding, limited only by our own ingenuity.

Regards,
Lyle.
 
Posted: 08:10am
07 Apr 2026
Copy link to clipboard
phil99
Guru


  Quote  Don't escape sequences work in INPUT statements?

Perhaps:-
Print "Enter"
Input "your age";a
 
Posted: 08:14am
07 Apr 2026
Copy link to clipboard
toml_12953
Guru

  phil99 said  
  Quote  Don't escape sequences work in INPUT statements?

Perhaps:-
Print "Enter"
Input "your age";a


Yeah, that's the workaround I use. It would be much neater if escape sequences worked in any string constant, though, especially when I want to use more complex escape sequences such as VT-100 commands.
Edited 2026-04-07 18:16 by toml_12953
 
Posted: 09:01am
07 Apr 2026
Copy link to clipboard
Mixtel90
Guru


I rarely have a Pico set up unless I'm working on a project now. I haven't got enough available space! Can you do it like you would using TYPE with VT100 codes? i.e. put the escape characters into a string then use PRINT Z$;: INPUT A ?

When I was playing with VT100 codes on the Micromite I used things like:

Sub ch:Print Chr$(27);"[";:End Sub
Sub Vcls:ch:Print "2J";:End Sub
Sub Vch:ch:Print "H";:End Sub
Sub Vat(row,col)
 Local vz$
 vz$=Str$(row)+";"+Str$(col)+"H":ch:Print vz$;
End Sub
 
Posted: 11:11am
07 Apr 2026
Copy link to clipboard
toml_12953
Guru

  Mixtel90 said  I rarely have a Pico set up unless I'm working on a project now. I haven't got enough available space! Can you do it like you would using TYPE with VT100 codes? i.e. put the escape characters into a string then use PRINT Z$;: INPUT A ?

When I was playing with VT100 codes on the Micromite I used things like:

Sub ch:Print Chr$(27);"[";:End Sub
Sub Vcls:ch:Print "2J";:End Sub
Sub Vch:ch:Print "H";:End Sub
Sub Vat(row,col)
 Local vz$
 vz$=Str$(row)+";"+Str$(col)+"H":ch:Print vz$;
End Sub


Yes, that's a workaround I use. Still, it would be much cleaner to be able to put the escape sequences in the strings directly.
 
Posted: 12:45pm
07 Apr 2026
Copy link to clipboard
bfwolf
Senior Member

  toml_12953 said  
...
Yes, that's a workaround I use. Still, it would be much cleaner to be able to put the escape sequences in the strings directly.


In the manual:
  Quote  OPTION ESCAPE
Enables the ability to insert escape sequences into string constants. See
the section Special Characters in Strings.
 
Posted: 12:53pm
07 Apr 2026
Copy link to clipboard
phil99
Guru


The OPTION ESCAPE manual entry could use extra info on where it works and where it doesn't.
It works in Print but not in Input statements.
 
Posted: 01:19pm
07 Apr 2026
Copy link to clipboard
circuit
Guru

  mozzie said  

I believe Geoff and Peter (amongst others) designed it with communications with the MMite in mind, for this it is hard to beat.



I still find that the PIC32MX170 is a most useful chip and the firmware is just 100% reliable.  I have such chips that have been running constantly for over seven years without a single failure. When the Microbridge design was published, I bought a tube of PIC16F1455 chips (Microbridge) and simply put one on every MicroMite board that I built - and still do. It is a wonderful and elegant combination that simply does what it says on the tin.
 
Posted: 01:29pm
07 Apr 2026
Copy link to clipboard
JohnS
Guru

  circuit said  I still find that the PIC32MX170 is a most useful chip and the firmware is just 100% reliable.  I have such chips that have been running constantly for over seven years without a single failure. When the Microbridge design was published, I bought a tube of PIC16F1455 chips (Microbridge) and simply put one on every MicroMite board that I built - and still do. It is a wonderful and elegant combination that simply does what it says on the tin.

Now there's praise!

John
 
   Page 2 of 4    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026