![]() |
Forum Index : Microcontroller and PC projects : MMBasic on the Raspberry Pi Pico - proposed functionality
![]() ![]() |
|||||
Author | Message | ||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
I'm not sure if that would be possible. I suspect the program is probably edited in ASCII in ram. To get it into a flash slot you have to save it to flash, tokenizing it in the process. Loss of power will always lose the ram contents so, unless you've saved it, your prog has gone. To be secure you'd have to force a save to flash on loss of power. That would entail erasing the slot then saving to it as you can't overwrite the flash. Your power rail on the standard Pico wouldn't last long enough to allow that. Wakeup will always be in a known state as the ram, c/w variables area, will be empty and the selected flash area newly copied into it. FLASH RUN n will erase the variables area so that would be clean. FLASH CHAIN n retains the variables so it's up to you whether they are clean or not. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2137 |
the register talking about supply: https://www.theregister.com/2021/06/01/rp2040/ |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
Thanks, I normally read El Reg, but I'd missed that story somehow. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
I've been away from this for a while due to health and stuff but I'm curious about the Pico I've seen to many threads about this but I couldn't find a specific answer to this Would it be possible to interface 2 X 7 segment displays directly to the pins on the picomite and drive them direct? I also want a gps input which would be serial obviously Are there any specific pins dedicated to specific functions like uart/serial input? I can't find any specific mention of what pins are what when it comes to picomite Nothing fancy, I just like the idea of a small double 7 segment display fed by a gps to display the speed in the car, powered by solar charged battery |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
You can drive displays like that, but be aware of the low current capability of the PicoMite. At most you can get 12mA sourced or sunk by a pin, but the total I/O current available is only 50mA shared between all the pins. There are no specific p1ns for 7-seg displays, but the PORT command is handy for driving the segments. You can help the current load by using a transistor/mosfet to drive the common side of the display rather than trying to source all the segments through one pin. Serial pins are restricted. There's a fair bit of info that I compiled into the TINAM (This Is Not A Manual) document. Check out the "PicoMite V5.07.00b0 - beta firmware" thread. The latest version is 0827 on page 12. I've included info on specific pins in there. Edited 2021-09-07 05:57 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
The PicoMite also includes in-built transparent GPS parsing - see the CMM2 manual for details of the GPS function setpin 1,uart0tx setpin 2,uart0rx Open "com0:9600" as GPS do If GPS(valid) then print gps(speed) pause 1000 loop |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
This 6-digit HC595-driven module would probably not be too hard to control. Do you have this pinout image: ![]() You do have to do some work with the picomite to figure out which pins to use, which will depend on whether you roll your own or use one of the PCBs available. Picomite on fruitoftheshed (Link has stopped working for me with Chrome browser, but still works with Opera.) It would also be easy to use a MCP23017 I2C port expander to directly drive 7-segment LEDs. One of the PCBs linked on the FruitOfTheShed page provides for a MCP23017. ~ Edited 2021-09-07 08:46 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Peter I've been reading the cmm2 manual regarding GPS, where it says TIME local time, does the time offset have to be set, or does it get the correct time from the GPS location? |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
You probably want a thread dealing with the CMM2 rather than an old thread on the PicoMite, or create a new thread, if you want to get a reply to this question. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
From the CMM2 manual Edited 2021-09-10 22:54 by matherp |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6210 |
Time zones and summertime are political decisions. The only way systems can determine them is with a lookup table which needs updating many times a year if you are going to cover the world. Much better to let your program have rules to cover the area of interest and forget about the rest of the world. Jim VK7JH MMedit |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2137 |
may help: http://www.fruitoftheshed.com/MMBasic.Function-to-Test-a-DateTime-to-see-if-Daylight-Savings-should-be-applied.ashx As written is for UK, but fairly easily tweakable for other time zones. Submit Date$+" "+Time$ string and it will return 1 or 0 for any DST offset to give local, "human friendly" time. GPS (and all my clocks run (servers, micro-controllers, etc.) are UTC - conveniently GMT for us brits and the eternal fury of our friends over the channel. I only ever do DST for presentation to humans where necessary/required and I add the offset at point of use, i.e. d$=Now() Print DateAdd(IsDST(d$),"h",d$) DST adjusted times in logs are mad because you can get missing blocks of times which is disconcerting and duplicated blocks of times which is mad confusing. Anyone using DST adjusted times in logs should be stapled to an electric pylon and whipped with llama entrails . Edited 2021-09-12 08:49 by CaptainBoing |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
GMT for all logs. Always. The radio amateurs have always kept their logs in GMT simply because of the different time zones. Trying to figure out your longitude onboard a ship would be virtually impossible without GMT too. Awww.... what have you got against poor llamas? :( Edited 2021-09-12 17:42 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() |
![]() |