Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:01 06 May 2024 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 : MMBasic on the Raspberry Pi Pico - proposed functionality

     Page 6 of 6    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 09:39pm 31 May 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1985
Posted: 07:04am 03 Jun 2021
Copy link to clipboard 
Print this post

the register talking about supply:

https://www.theregister.com/2021/06/01/rp2040/
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5742
Posted: 07:41am 03 Jun 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1676
Posted: 07:04pm 06 Sep 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 5742
Posted: 07:52pm 06 Sep 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 8592
Posted: 09:35pm 06 Sep 2021
Copy link to clipboard 
Print this post

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 States
Posts: 3018
Posted: 10:39pm 06 Sep 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1676
Posted: 11:20am 10 Sep 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 5742
Posted: 11:33am 10 Sep 2021
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 8592
Posted: 11:54am 10 Sep 2021
Copy link to clipboard 
Print this post

From the CMM2 manual

  Quote  OPEN comspec$ AS GPS [,timezone_offset] [,monitor]

Will open a serial communications port for reading from a GPS receiver. See
the GPS function for details. The sentences interpreted are GPRMC,
GNRMC, GPCGA and GNCGA.
The timezone_offset parameter is used to convert UTC as received from the
GPS to the local timezone. If omitted the timezone will default to UTC.
timezone_offset can be a any number between -12 and 14 allowing the time to
be set correctly even for the Chatham Islands in New Zealand (UTC +12:45).
If the monitor parameter is set to 1 then all GPS input is directed to the
console. This can be stopped by closing the GPS channel.

Edited 2021-09-10 22:54 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5914
Posted: 10:14pm 10 Sep 2021
Copy link to clipboard 
Print this post

  lew247 said  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?


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   MMBasic Help
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 10:40pm 11 Sep 2021
Copy link to clipboard 
Print this post

  TassyJim said  
  lew247 said  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?


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

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 Kingdom
Posts: 5742
Posted: 07:40am 12 Sep 2021
Copy link to clipboard 
Print this post

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
 
     Page 6 of 6    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024