The hex file is ASCII text and has to be sent using a different protocol than the bin file. The bin can just be sent a byte at a time directly while the hex file has to be interpreted as the ASCII text comes in.
Thanks for your observation and everyoneās patience. Turns out it was related to how I downloaded the file from github. I tried again and made sure the file was the right size and things are now working!
Iām looking forward to being able to move things from PicoMite to PicoCalc with the new language features (structures in particular). Thanks, Ernst for your efforts on this.
Thanks for the tips on flashing. I flashed the standard Picocalc with picocalc_v6.02.00a_pico.uf2. Now the data connection with the Maximite Control Center via MM Edit 5.3.3 no longer works. Do I need to do anything else to get it working again? The original came with bootloader V0.5 and MBasic as PicoMite_cbf6d71.bin. When I flashed it back, everything worked again.
I suggest you nuke the pico with flash_nuke.uf2 and then flash the v6.02.00a uf2.
I donāt know anything about MMEdit but I got it to work with no problems using MMEdit 5.4 under Windows and V6.02.00a on the PicoCalc connected through the micro USB.
To show all toolbars, select 'Show full menus' in Setup menu
A:\untitled.bas
File read failed!!
Nothing to load.
Connected to COM5 at 115200
option list
PicoMite MMBasic RP2350A V6.02.00
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP6,GP7, SLOW
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION DEFAULT COLOURS GREEN, BLACK
OPTION KEYBOARD I2C
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL CONSOLE ,, FF00
OPTION DISPLAY 26, 40
OPTION LCDPANEL ST7796SP, PORTRAIT,GP14,GP15,GP13,,INVERT
OPTION BACKLIGHT LCD 16
OPTION SDCARD GP17, GP18, GP19, GP16
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION PLATFORM PicoCalc
>
I donāt know. I did nothing on the picocalc, used F2 in MMEdit:
To show all toolbars, select 'Show full menus' in Setup menu
C:\Users\Ernst\AppData\Local\MMedit5\untitled.bas
Uploading using: 'target port\:115200 s\picomite
Upload started
failed!
Check port then try again
Not connected!
Connected to COM4 at 115200
C:\Users\Ernst\AppData\Local\MMedit5\untitled.bas
Uploading using: 'target port\COM4:115200 s\picomite
Upload started
NEW
>
AUTOSAVE N
Progress: 1/8
Upload completed 1
Saved 84 bytes
>
Time taken: 1003mS
RUN
[5] For n = 1 To 100
Error : N is not declared
>
FYI: I do not really use MMEdit, other user may be able to help you.
B4 is better than previous attempts but still locks up on a unit with nothing but an RTC attached. Iām going to run a program that prints out a timer so I can see exactly how long it runs before locking up and see if itās consistent.
@ernst I think I found a bug with āStruct Loadā in 6.02.04Beta.
Below is a program which creates a file containing 2 structure records. It then reads the file back. I noticed when I read the last record, EOF() still returns FALSE and when I read record 3 (which doesnāt exist) it still says FALSE.
Can you test this for me to see if itās a bug or am I doing something wrongā¦..thanksā¦brian
' bugtest.bas - test for possible bug
'
' Brian Osborne; 2026
'
Option Explicit
Option Default Integer
Dim TestFile1$="test1.tst"
TYPE myStruct
recNum AS Integer
date AS String Length 10
notes AS String Length 80
END TYPE
Dim dataFileRecLen
dataFileRecLen = Struct(SIZEOF "myStruct")
Print "Size of myStruct is "; dataFileRecLen
DIM rec AS myStruct
' create newfile with 2 records
'
' record 1....
rec.recNum = 1
rec.date = "2026-01-01"
rec.notes = "This is record 1."
?:?"Record 1 is...."
Struct Print rec
?"Writing record 1 to "; TestFile1$
Open TestFile1$ For Output As #9
Struct Save #9, rec
'
' record 2....
rec.recNum = 2
rec.date = "2026-02-28"
rec.notes = "This is record 2."
?:?"Record 2 is...."
Struct Print rec
?"Writing record 2 to "; TestFile1$
Struct Save #9, rec
'
Close #9
?TestFile1$; " closed."
'
' Now read the data back
'
?:?"Pausing for 15 seconds..."
Pause 15000
'
?:?"Reading "; TestFile1$
?"Opening file..."
Open TestFile1$ For Input As #9
?"EOF= ";eof(#9)
?"Reading record 1....."
Struct Load #9, rec
?"EOF= ";eof(#9)
?"Record 1 from file is..."
struct print rec
'
'
?"Reading record 2....."
Struct Load #9, rec
?"EOF= ";eof(#9)
?"Record 2 from file is..."
struct print rec
'
'
?"Attepting to read record 3....."
Struct Load #9, rec
?"EOF= ";eof(#9)
?"Record 3 from file is..."
struct print rec
Close #9
END
I did a test using my B4 (Pico 2H, COM5) and the official B4 (Pico 2 Plus, COM23) with the help of MMEdit, in both cases the program gave the expected result:
To show all toolbars, select 'Show full menus' in Setup menu
C:\Work\test.bas
Uploading using: 'target port\:115200 s\picomite
Upload started
failed!
Check port then try again
Not connected!
Connected to COM5 at 115200
C:\Work\test.bas
Uploading using: 'target port\COM5:115200 s\picomite
Upload started
NEW
>
AUTOSAVE N
Progress: 50/81
Upload completed 1
Saved 1520 bytes
>
Time taken: 1237mS
RUN
Size of myStruct is 104
Record 1 is....
MYSTRUCT:
.RECNUM = 1
.DATE = "2026-01-01"
.NOTES = "This is record 1."
Writing record 1 to test1.tst
Record 2 is....
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
Writing record 2 to test1.tst
test1.tst closed.
Pausing for 15 seconds...
Reading test1.tst
Opening file...
EOF= 0
Reading record 1.....
EOF= 0
Record 1 from file is...
MYSTRUCT:
.RECNUM = 1
.DATE = "2026-01-01"
.NOTES = "This is record 1."
Reading record 2.....
EOF= 1
Record 2 from file is...
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
Attepting to read record 3.....
EOF= 1
Record 3 from file is...
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
>
08:09:41 Port: COM5 removed
Disconnected
08:10:27 Port: COM23 inserted
failed!
Check port then try again
Connected to COM23 at 115200
>
>
>
>
> C:\Work\test.bas
Uploading using: 'target port\COM23:115200 s\picomite
Upload started
NEW
>
AUTOSAVE N
Progress: 50/81
Upload completed 1
Saved 1520 bytes
>
Time taken: 2525mS
RUN
Size of myStruct is 104
Record 1 is....
MYSTRUCT:
.RECNUM = 1
.DATE = "2026-01-01"
.NOTES = "This is record 1."
Writing record 1 to test1.tst
Record 2 is....
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
Writing record 2 to test1.tst
test1.tst closed.
Pausing for 15 seconds...
Reading test1.tst
Opening file...
EOF= 0
Reading record 1.....
EOF= 0
Record 1 from file is...
MYSTRUCT:
.RECNUM = 1
.DATE = "2026-01-01"
.NOTES = "This is record 1."
Reading record 2.....
EOF= 1
Record 2 from file is...
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
Attepting to read record 3.....
EOF= 1
Record 3 from file is...
MYSTRUCT:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
>
In both cases after reading record 2 the file is positioned at EOF and reading past EOF does not change EOF or the previous read data. Works as I would expect. If the medium would have been a magnetic tape (transport) then EOF indicates that the tape is positioned BEFORE the EOF marker, trying to read past EOF the transport moves past the EOF marker, notes that EOF is detected and moves the tape back to before the EOF marker. No data is read, only the status EOF is returned to the caller.
But you are right that something is not correct, in particular when comparing it to magnetic tape. With a magnetic tape EOF will not be reported after reading record 2 because the EOF marker has not yet been recognized. IMHO discussing this implementation in MMBasic could be very political, iirc basic has always worked this way
Now for the not that nice reply. While writing the about the tape transport I had the PicoCalc next to me connected to MMEdit. Without any interaction the following was displayed:
.RECNUM = 2
.DATE = "2026-02-28"
.NOTES = "This is record 2."
>
08:21:53 Port: COM23 removed
Disconnected
08:21:54 Port: COM23 inserted
Connected to COM23 at 115200
Total of 6 Mbytes PSRAM available
>
I saw the lines moving up, I heard the loudspeaker, but I did not a an error message . And the keyboard does not respond. Must try to repeat this with the official B4.
@ernst, I think you should either make your firewall not quite as strict or host your files somewhere else⦠I also had to download UF2ās for someone and email them to them because they simply couldnāt get past your firewall.