![]() |
Forum Index : Microcontroller and PC projects : PicoMite Alpha Firmware
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
> option reset: flash erase all: var clear: UPDATE FIRMWARE PicoMite MMBasic Version 5.07.00a13 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > ?tempr(27) 28 > ?tempr(27) 30.5 All good with a13 . . . but: PicoMite MMBasic Version 5.07.00a25 Copyright 2011-2021 Geoff Graham Copyright 2016-2021 Peter Mather > ?tempr(27) Error : Invalid configuration PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
Hi Peter, My first Picomite bug(?) Running a25 - I think - how can I find out for sure, e.g. get the Pico to print the Micromite copyright/banner ? I'm on Linux and as others have reported both PuTTY and GFXterm disconnect when the Pico is reset. Starting with blank FAT-32 formatted SD card > files A:/ 0 directories, 0 files > edit Print "Hello World" [F1] Saved 23 bytes > list Print "Hello World" > save "hello.bas" Error : A hard error occurred in the low level disk I/O layer > files A:/ 0 hello.bas 0 directories, 1 file > list Print "Hello World" > save "hello.bas" > files A:/ 21 hello.bas 0 directories, 1 file > save "hello.bas" Error : A hard error occurred in the low level disk I/O layer > files A:/ 0 hello.bas 0 directories, 1 file > save "hello.bas" Error : A hard error occurred in the low level disk I/O layer > save "hello.bas" Error : A hard error occurred in the low level disk I/O layer > save "hello.bas" > files A:/ 21 hello.bas 0 directories, 1 file I've seen variations on this including corrupting the SD card filesystem entirely (or at least that bit that the "files" command queries). I'm using a quality SanDisk SD card - assuming Amazon didn't send me a fake. I'm using a Maker Pi Pico Rev 1.2 board (same as you I believe). I'm using these options: OPTION COLOURCODE ON OPTION SDCARD GP15 OPTION SYSTEM SPI GP10,GP11,GP12 I haven't seen any problems reading from the SD Card. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3988 |
Maybe power-related? John |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
It's being powered by a Pi3 on a good quality USB cable which has been a reliable power-source for my CMM2, so ignorant as I am on the subject I'm still going to put a check in the "unlikely" box. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
I suppose you'll know if you install a25, Tom. :) I don't think there's an official way to read the alpha version apart from the sign-on message. :( Grounding RUN will reset the Pico - but apparently will disconnect your USB. Likewise, grounding 3V3EN will also restart, but that's via power off. Run Tera Term on Windows in a VM? :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
I'm not sure a 1 GB Pi is up to that ... and in an case a Pi is an ARM and not an x86 machine so I'm not certain how that would work anyway - same problem with running Wine. (Outside my area of expertise though.) [Edit] Also should we perhaps acknowledge the absurdity of an expectation that users will be hosting their Pico's on Windows and using Tera Term and not, as presumably the Raspberry Pi Foundation would be hoping on Raspberry Pi's. Though the apparent lack of a decent serial terminal emulator is rather damning. ![]() ![]() ![]() Best wishes, Tom Edited 2021-06-13 01:03 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
That just tells me what I think I've installed, it doesn't tell me what is actually running ![]() MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Run a proper operating system and a proper terminal program and you will see the copyright banner with the version. Note I develop under W10 and I test under W10. That is all I'm ever going to do. If you run Linux or even worse MacOS you are on your own. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
As constructive as discussions of the relative merits of the two leading toy operating systems are perhaps we should give it a miss this time ![]() ![]() ![]() Can anyone confirm the bug I described with the latest alpha and suggest how I should investigate it further. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Try different CPU speeds. The firmware tries to optimize SD access to the speed. May be too aggressive for your card. Faster may be better than slower |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
I've had no problems whatsoever with SD card access on a25 under win 10, Tom. I'm afraid that's all the info I have. I'm using: OPTION SYSTEM SPI GP2, GP3, GP0 OPTION SDCARD GP1 OPTION CPUSPEED 250000 I've had the same SD card running on my other Pico but I had to drop CPUSPEED tp 200000 as it locks up if it is asked to run faster. It's not going to be possible to see the sign on message, I don't think. There's no TTL serial console on the Pico. I can only suggest loading a25 over whatever you have in now so that you *will* know what's running. Just use XMODEM if necessary to save anything important in flash first. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
At present, with a25, it appears that you have to use SETPIN again if you have closed the com port. The top of the program had: SetPin 1,uart0tx:SetPin 2,uart0rx Opening COM for ESP-01 Reopening COM for ESP-01 as #9 for html simulation [176] Open "com0:115200,4096" As #9 Error : Pins not set for UART0 > Open "com0:115200" As #9 Error : Pins not set for UART0 > SetPin 1,uart0tx:SetPin 2,uart0rx > Open "com0:115200" As #9 > close 9 > Open "com0:115200,4096" As #9 Error : Pins not set for UART0 > Open "com0:115200" As #9 Error : Pins not set for UART0 > SetPin 1,uart0tx:SetPin 2,uart0rx > Open "com0:115200,4096" As #9 PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
After a number of cycles with "AUTOSAVE", I got "not enough memory". I power-cycled and did AUTOSAVE with the same program, and it worked. Perhaps a memory leak with some actions--easily enough overcome with the power cycle. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1958 |
I setup my Pico on my Win10 machine and now I have moved to my Linux machine in my workshop. All works ok but I can't load new firmware, the Pico shows up but I cant mount and open it. Can someone run me through how it is done. Edit. I'm no Linux expert, rather new to it. Edited 2021-06-13 08:19 by palcal "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
On Raspbian (which is a Linux) you hold down the bootloader button and plug in the USB. The Pico mounts as a flash drive and the file explorer opens up. You drop in the new firmware and the Pico unmounts and restarts. I'm guessing you are seeing none of that? What flavor of Linux are you running? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4238 |
A brief test shows it seems to work at 250 MHz, thanks. Given that this can apparently screw the whole filesystem if "wrong" it may need more attention. Oh, and I was running a25, I have a Win10 machine in my study/office but I don't like to use it for my hobbying as that is too much like real work. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1958 |
Hi Tom, Thanks I thought that is what I did the first time. Tried again and all is OK. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
An HTML Server on the PicoMite ![]() This htmlserver.bas was first written for the 64-pin MM+ in 2017. The biggest thing that has changed since in the MMBasic used is the syntax for longstrings. On the MM+ they were implemented by Peter Mather using CSUBs. When he incorporated them into the MMX & subsequent (Armmite, CMM2), he changed to more informative command names. I spent the day today converting it. The surprising thing to me is that everything worked except for reading a DS18B20 (which I'm sure will work again when Peter gets back and figures out what he did between a13, when TEMPR worked, and a25, when it doesn't). The program is 990 lines long, 33,548 characters. This is a pretty good workout for the PicoMite, and a tribute to Peter for the work he has done bringing it to this point. I did find some instances where the Picomite couldn't handle long lines with which the MM+ had no problem. The web connection is using an ESP-01 in AT mode with SDK version 2.0. The original HTML server framework was first published by Peter Mather here (MM2: webserver with AT mode ESP8266). This instance of the program is a work in progress. I don't remember all that I was doing in 2017, and some things don't work as I supposed they should. Nonetheless it does show what can be done in this line. The program has no guts--that is, it doesn't have the code to actually control a geothermal heating and cooling system based on the inputs. It's original intention was to provide a way to input simulated sensor readings in order to exercise the actual control code. Code and the needed HTML template file are in the attached zip. htmlserver.zip Output of MEMORY: > memory Program: 30K (30%) Program (989 lines) 50K (70%) Free RAM: 41K (36%) 175 Variables 3K ( 2%) General 68K (62%) Free > ~ Edited 2021-06-13 11:35 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
hitsware2![]() Guru ![]() Joined: 03/08/2019 Location: United StatesPosts: 715 |
Geez .... ![]() my site |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
It might sound a bit like Linus Torvolds, but it's fair enough. :) In this particular case the problem isn't with the Pico or MMBasic - you'd have the same problem with anything that boots via serial USB. Once PEEK() is working we might be able to find out where the header text is stored. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() ![]() ![]() |
![]() |