Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:04 20 Apr 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 : Pico Lipo Issues

     Page 1 of 2    
Author Message
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 02:21pm 23 Jun 2022
Copy link to clipboard 
Print this post

Pimoroni makes a version of the PICO board with a few added features.

Pimorono PicoLipo

Onboard Power on/off switch
ONboard lipo plug for 3.7V lipo with charging
Onboard QIIC I2C connector attached to pins 4 and 5

The problem is... if I load *any* version of the Picomite UF2's on it... the immediate interpreter is S L O W.

If I press "enter" on any terminal emulator running at 19200 baud, it takes 4 seconds to give me another ">" prompt back, unlike a normal pico where it comes back right away.

I can't figure out what's going on...

CPUSPEED is the same.

Even with a fresh uf2 flash, and no options... slow.

Note: Editing and execution and even Autosave seem normal.
Edited 2022-06-24 00:45 by pwillard
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 03:09pm 23 Jun 2022
Copy link to clipboard 
Print this post

Who knows? It's a complete unknown. Certainly, MMBasic won't make use of the extra flash, but whether it being there causes some sort of problem I don't know. It could be that the flash chip they used is bigger but slower.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 03:22pm 23 Jun 2022
Copy link to clipboard 
Print this post

I'm seeing something similar with another Pico clone. The common factors are bigger flash and USB-C. Given that the execution speed is the same my suspicion is that it is something to do with the USB-C being treated differently by the PC - perhaps buffering differently?
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 03:25pm 23 Jun 2022
Copy link to clipboard 
Print this post

No problem with my 8MB PGA2040s.

Isn't there something different that can happen with the orientation of the USB-C connection?




Craig
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 03:53pm 23 Jun 2022
Copy link to clipboard 
Print this post

Hmmm,  Actually... there does seem to be some impact on program execution...

I create a CLOCK (based on the sample from the manual) I have an RTC connected as well as a Waveshare res-touch 3.5" display... and with no added delays, just testing if TIME$ changes between loop iterations... and only updating the LCD if seconds are different but, the SECONDS will pause and then jump roughly about 4 seconds at a time.

Oddness.  I mainly wanted to use the PICOLIPO as a battery Backed up alarm clock with LCD display... the LIPO board has a very handy QIIC connector for the RTC... so no SPIKEY PICO is needed.

Note: the pausing is intermittent... sometimes it will update seconds for 5 or 10 seconds as expected, then miss any number of seconds... and on and on... random.

RE: "Isn't there something different that can happen with the orientation of the USB-C connection?"

It does this when running entirely off the LIPO... with nothing attached to USB as well... so I guess not.
Edited 2022-06-24 02:58 by pwillard
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 12:49pm 24 Jun 2022
Copy link to clipboard 
Print this post


Ok, really weird...

I cobbled together some quick code for a decent-looking Clock... I left it running overnight.

Today, I can't reproduce the odd delays in immediate mode anymore.

If I break out of the running program... or load a new one... that 4-second delay to get a ">" is gone.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:52pm 24 Jun 2022
Copy link to clipboard 
Print this post

Newness  

Great to know that it's running    

Nice-looking board....hopefully more commentary to come  









Craig
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 05:33pm 24 Jun 2022
Copy link to clipboard 
Print this post

Well, I suppose... if you want commentary...   I can indulge in a bit of background to start off with...

So WHY am I making yet another silly alarm clock? (These will cost you next to nothing if you want to buy a manufactured one)

Well, I was a really big fan of these things pictured below.




SIRIUSXM Table Top Radio that would pull stations over wifi if you had a subscription... but it was an alarm clock radio, as well.

And, then they stopped working (as a radio)... Because they only used HTTP:// not HTTPS:// and SiriusXM basically killed it when they went to HTTPS ONLY services. They are now long obsolete and will only play a beep tone as an alarm... a beep tone frequency that I cannot hear in my left ear. (At all... zip, nothing, nada)

But I still loved it as an alarm clock.  It has a wonderful user interface and a nice clock display.

So for the past few months, I've pitted a bunch of devices against each other, ESP32, Raspberry Pi Zero W, Arduino, Pico running Python... and then BAM, I discover PICOMITE. Now, this is the first of my projects that doesn't use networking and NTP to set the time... but I'm pretty happy with the DS3231 RTC so far. I'm loving the experience of working with the PICO running BASIC. Great Stuff!

Now I've known about Maximite, Colour version... etc since I have been a long-term PE subscriber.  I even have a half-started project based on the Pic32... but the Picomite just opened my eyes to my long-lost friend... BASIC.  Yeah, It's nostalgic. I cut my teeth on a Tandy home computer way back when.  

I imagine nobody has a clue about me.  I'm new here... so what would people say about yet another Pete?

"This guy is a hack.  His first experience with computers was hand-loading bootstrap routines onto the front panel of a MIL-STD computer in 1975. He later went to work for Digital Equipment Corporation in 1978, ultimately leaving Hewlett Packard just a few years ago.  He used a word processor for school work as early as 1979 thanks to a PDP-8.  He might still have some 8" floppies with homework on them. His first encounter with BASIC happened on a Tandy TRS80 model 1, and of course, the local Radio Shack let him have free reign to write simple programs to show off what the machines could do.

He is not now, nor has he ever been a great programmer. It doesn't mean he never tried. All these years he's been connecting computers together with users and computers with each other. He really only wrote programs to make that job easier. "

[quote from an actual computer room discussion]
----
Field Engineer:  "Hey Pete, how do I set the dip switches up for this new serial MUX board?"

Pete:   "Wait a minute, let me log in to this VAX 11/730... I have a BASIC program for that."

===

Anyway... When I finally figure out how to make a decent GUI with MMBASIC... I'll post some code and details about my project.  I'm learning all this Gui/Touchscreen stuff in a trial-by-fire.

My goals for the project include having it play a WAV file or files (that I can actually hear)  as an alarm.  And DS3231 seems to keep a pretty good time reference.

The 3.5" TouchScreen is really nice... even if it can't talk back to the Picomite.

Pete
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 06:30pm 29 Aug 2022
Copy link to clipboard 
Print this post

Follow-up.

The PICO-LIPO seems to not be a good fit for MMBASIC.

I'm not sure if anyone has seen the MMEDIT 5 thread where I was having issues with MMEDIT/MMCC deploying updates with either disconnection errors or upload failures/time-outs but it seems it seems it was specific to the PICO LIPO board.





What I liked about the PICO LIPO was that it had a built-in, Lipo Support with charging and a better (quieter) power supply, and a built in QWIIC plug but these differences seem to all add up to an ultimately bad performance.  The PICO LIPO often would have this behavior where the ">" response is very slow... sometimes 3-5 seconds.  ...And this slow response is likely what is making MMCC and MMEDIT sessions go bad. (due to extra memory maybe -16MB-, no clue)

So, to see if this was really the case... I cobbled a QWIIC connector onto a regular PICO and added it to my circuit to replace the PICO LIPO.





Note: Unlike the PICO LIPO, the regular PICO has a very noisy power supply so the MP3 player now had an annoying whine while playing audio... so I needed to also add a 3.3V linear regulator to the 5V supply and it was quiet again.  PICO LIPO did not have that issue.





So yes, PICO LIPO (for ME) has issues being a reliable MMBASIC device... though it worked seemingly as expected until I updated FIRMWARE and MMEDIT versions to the most recent... once the updates were done... it was having issues similar to the issues I experienced when I first started using it.

I'm back to using a regular PICO with some extra stuff tacked on.

Oh well.

.
Edited 2022-08-30 04:44 by pwillard
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5883
Posted: 02:49am 30 Aug 2022
Copy link to clipboard 
Print this post

MMEdit/MMCC was waiting a fixed 360mS (default) for the prompt after sending ^C. Not long enough for your device.
I have changed that to a maximum of 4 seconds in the test version I posted in the MMEdit5 thread. That mighty be enough. There will probably be other changes I have to make to be reliably with your PICO LIPO.
At 4 to 5 times the price of a standard pico, I am not interested in getting one to test with.

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 07:40am 30 Aug 2022
Copy link to clipboard 
Print this post

  Quote  The problem is... if I load *any* version of the Picomite UF2's on it... the immediate interpreter is S L O W.


What host are you using? Please try plugging into a USB2.0 port not anything higher. Plug into the computer in after the Pico is already connected to the USB cable.
Try lots of variations and let us know if you see any changes.
If you take a simple benchmark as below. Please compare results with the Lipo and a standard Pico

print "MMBASIC benchmark (C) KnivD 2016"
clear
dim integer t, i=0
dim float x(1000), f=0.0
dim string s=""
print "Calculating... ";
do
s=""
f=0.0
i=0
TIMER=0
do while TIMER<30000
 i=i+2 : f=f+2.0002
 if (i mod 2)=0 then
   i=i*2 : i=i\2
   f=f*2.0002 : f=f/2.0002
 end if
 i=i-1
 for t=1 to 100
   f=f-1.0001
   if (f-int(f))>=0.5 then
     f=sin(f*log(i))
     s=str$(f,6,6)
   end if
   f=(f-tan(i))*(RND(0)/i)
   if instr(s,left$(str$(i),2))>0 then s=s+"0"
 next
 x(1+(i mod 1000))=f
loop
print chr$(13)+"Performance: "+str$((i*1024)\286,8,0)+" grains"
loop
end
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 10:59am 30 Aug 2022
Copy link to clipboard 
Print this post

I'm using a USB3 port...

Both tests using: PicoMiteV5.07.05b17.uf2

Results from a standard PICO on that USB Port:
  Quote  
MMBASIC benchmark (C) KnivD 2016
Performance:     1836 grains


Results from PICO LIPO on that same USB port:
  Quote  
MMBASIC benchmark (C) KnivD 2016
Performance:     2073 grains



With the LIPO and a fresh install of PicoMiteV5.07.05b17.uf2, the interpreter is still taking 3-5 seconds to show ">" after a wakeup or pressing <cr>

Changed USB ports... same result.

I have not tried on a different computer yet...  but will do so.

Using the updated MMCC...   it just fails differently on deploy now... I no longer see an attempt... no "NEW" or "AUTOSAVE" statements show up... so that doesn't seem to help. No upload happens and I eventually get the ">" prompt back.





The only fundamental difference I see between a standard PICO and the LIPO unit I have is that the memory is 16MB using a WINBOND 25Q128 chip.

Schematic

I'm considering ordering a 4MB PIMORONI PICO LIPO as it is only £6.48 right now.

.
Edited 2022-08-30 21:28 by pwillard
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 11:58am 30 Aug 2022
Copy link to clipboard 
Print this post

Can you use teraterm on a W10/11 PC as a "standard"? Please also try SETPIN GP23,OFF.
It is not the 16Mb flash as the benchmark shows flash access is probably faster than a normal Pico.
Also, please try different cables - apparently some USB-C cables have electronics built in.
Edited 2022-08-30 22:07 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3649
Posted: 12:40pm 30 Aug 2022
Copy link to clipboard 
Print this post

USB-C wires/connectors for sure sometimes have resistors in them (I don't know about any other electronics within the wires).

The intention can be such things as to signal the end device just wants charging but I've seen different interpretations of which resistors should be where & what resistance value.

John
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 12:54pm 30 Aug 2022
Copy link to clipboard 
Print this post

New cable.  USB Micro with a USB-C adapter.







As I mentioned.  Teraterm works with "new" "autosave" and "paste buffer" upload.






Here is an observation though...
If I cycle power on the PicoLipo...
then use TeraTerm to perform an autosave upload of the benchmark code and press CTRL-Z to save it, I get the ">" prompt back... and it's ZIPPY again... no delays.

If I run the benchmark and CTRL-Z to exit the program... it's still giving fast response.  If I enter "NEW", I'm back to 3-5 second response on the ">" prompt.

Setting GP23 to OFF seems to have had no effect.


.
Edited 2022-08-30 23:07 by pwillard
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 01:04pm 30 Aug 2022
Copy link to clipboard 
Print this post

Don't understand - is there still an issue if using teraterm or is it now working?
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 01:11pm 30 Aug 2022
Copy link to clipboard 
Print this post

Teraterm works as expected when using the AUTOSAVE and the CODE PASTE method... TT must tolerate the delays (I GUESS).  MMCC however, just seems to give up.

I'm assuming it's related to the long delay response on the ">" prompt. That has been either Fast (normal, under the right conditions) or Slow when it's misbehaving.

If there are NO PROGRAMS in memory (IE; a NEW command was issued, the slowness begins). if ANY program is in memory, (IE. use edit to create a single line of code and the F1 to save and execute) the prompt returns quickly to all subsequent commands.
Edited 2022-08-30 23:16 by pwillard
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 01:16pm 30 Aug 2022
Copy link to clipboard 
Print this post

Might not be relevant to this issue but I have read elsewhere that which way up you plug in a USB-C plug can determine which of its extra features are enabled. Try it both ways and see if it changes anything.
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 274
Posted: 01:18pm 30 Aug 2022
Copy link to clipboard 
Print this post

So MMCC issues the NEW command before an AUTOSAVE... and thus the "slow prompt" issue begins.  Flipping the USB-C... no change.

So, my testing now shows it seems to be very related to issuing a "NEW" statement. And it ONLY starts working right if I use the EDIT command and let's say I enter [ ' a remark ] and press SAVE...  Any Immediate mode commands (even the same 'remark') won't fix the behavior.
Edited 2022-08-30 23:29 by pwillard
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3649
Posted: 01:51pm 30 Aug 2022
Copy link to clipboard 
Print this post

So is it MMCC rather than the Pico?

John
 
     Page 1 of 2    
Print this page
© JAQ Software 2024